deployment - Deploy Grails 2.3.0 to Glassfish Server -
i have application build grails 2.3.0 , type command 'grails war' generate war file. type following command deploy application :
asadmin deploy app_path/target/myapp.war
but following error:
remote failure: error occurred during deployment: exception while deploying app [myapp] : org.xml.sax.saxparseexception; linenumber: 137; columnnumber: 15; deployment descriptor file web-inf/web.xml in archive [myapp]. cvc-complex-type.2.4.a: 從元素 'init-param' found invalid content。expect '{"http://java.sun.com/xml/ns/javaee":run-as, "http://java.sun.com/xml/ns/javaee":security-role-ref, "http://java.sun.com/xml/ns/javaee":multipart-config}'。. please see server.log more details.
i use grails 2.3.0 , same error on both glassfish 3.1.2.2 , glassfish 4.
how can fix error ? appreciate.
-- update
i use grails command "grails install-templates" generate web.xml, , move web.xml web-app/web-inf, still got same error message. following web.xml:
<?xml version="1.0" encoding="utf-8"?> <web-app version="3.0" metadata-complete="true" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <display-name>/@grails.project.key@</display-name> <context-param> <param-name>contextconfiglocation</param-name> <param-value>/web-inf/applicationcontext.xml</param-value> </context-param> <context-param> <param-name>webapprootkey</param-name> <param-value>@grails.project.key@</param-value> </context-param> <filter> <filter-name>sitemesh</filter-name> <filter-class>org.codehaus.groovy.grails.web.sitemesh.grailspagefilter</filter-class> </filter> <filter> <filter-name>charencodingfilter</filter-name> <filter-class>org.springframework.web.filter.delegatingfilterproxy</filter-class> <init-param> <param-name>targetbeanname</param-name> <param-value>characterencodingfilter</param-value> </init-param> <init-param> <param-name>targetfilterlifecycle</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>charencodingfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> <dispatcher>request</dispatcher> <dispatcher>error</dispatcher> </filter-mapping> <listener> <listener-class>org.codehaus.groovy.grails.web.context.grailscontextloaderlistener</listener-class> </listener> <!-- grails dispatcher servlet --> <servlet> <servlet-name>grails</servlet-name> <servlet-class>org.codehaus.groovy.grails.web.servlet.grailsdispatcherservlet</servlet-class> <load-on-startup>1</load-on-startup> <async-supported>true</async-supported> <init-param> <param-name>dispatchoptionsrequest</param-name> <param-value>true</param-value> </init-param> </servlet> <!-- groovy server pages servlet --> <servlet> <servlet-name>gsp</servlet-name> <servlet-class>org.codehaus.groovy.grails.web.pages.groovypagesservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>gsp</servlet-name> <url-pattern>*.gsp</url-pattern> </servlet-mapping> <session-config> <!-- 30 minutes --> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <!-- order of welcome pages important. jboss deployment break if index.gsp first in list. --> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>index.gsp</welcome-file> </welcome-file-list> </web-app>
Comments
Post a Comment