|
| Apache Geronimo > Discussion Forums | User List | Dev List | Wiki | Issue Tracker |
|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Difficulty deploying Grails war file to GeronimoI'm trying to deploy a working (but very simple) grails application war
to Geronimo, but with no luck. I've already made the changes to the geronimo-web.xml file that were specified online, leaving me this: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"> <sys:environment> <sys:moduleId> <sys:groupId>default</sys:groupId> <sys:artifactId>TimeTracker</sys:artifactId> <sys:version>0.1</sys:version> <sys:type>war</sys:type> </sys:moduleId> <!-- For Grails to work properly we use the "parent-last" strategy : --> <inverse-classloading/> </sys:environment> <context-root>/TimeTracker</context-root> <virtual-host>www.squeakydolphin.com</virtual-host> </web-app> The exception I'm getting is this: Failed to load servlet class org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet org.apache.geronimo.common.DeploymentException: Failed to load servlet class org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet at org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.getPortInfo (AdvancedWARWebServiceFinder.java:148) at org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverPOJOWebServices (AdvancedWARWebServiceFinder.java:125) at org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverWebServices (AdvancedWARWebServiceFinder.java:45) at org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServices (WARWebServiceFinder.java:70) at org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServices (JAXWSServiceBuilder.java:97) at org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices (JAXWSServiceBuilder.java:80) at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext (AbstractWebModuleBuilder.java:364) at org.apache.geronimo.jetty6.deployment.JettyModuleBuilder.initContext (JettyModuleBuilder.java:350) at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext (SwitchingModuleBuilder.java:159) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration (EARConfigBuilder.java:595) at org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:254) at org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke (ReflectionMethodInvoker.java:34) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:867) at org.apache.geronimo.kernel.basic.BasicKernel.invoke (BasicKernel.java:239) at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy (AbstractDeployCommand.java:116) at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run (DistributeCommand.java:61) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet in classloader default/TimeTracker/0.1/war at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass (MultiParentClassLoader.java:437) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass (MultiParentClassLoader.java:279) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.getPortInfo (AdvancedWARWebServiceFinder.java:142) ... 22 more Any help would be appreciated. Thank you. -- Ken T. <ktectropy@...> |
|
|
Re: Difficulty deploying Grails war file to GeronimoKen T. wrote:
> I'm trying to deploy a working (but very simple) grails application war > to Geronimo, but with no luck. Did you include the grails-web-x.y.z.jar dependency in WEB-INF/lib in the war? Could you give us more information about the layout of your war and the web.xml configuration? -- Fredrik Jonson |
|
|
Re: Difficulty deploying Grails war file to GeronimoOn Sun, 27 Sep 2009 09:42:02 +0000, Fredrik Jonson wrote:
> Ken T. wrote: > >> I'm trying to deploy a working (but very simple) grails application >> war to Geronimo, but with no luck. > > Did you include the grails-web-x.y.z.jar dependency in WEB-INF/lib in > the war? Yes it is there. > > Could you give us more information about the layout of your war and the > web.xml configuration? Sure. The war is the standard produced by grails. So there isn't anything strange there. And it deploys to tomcat without problems. The web.xml file is generated. I ran it through xmlindent and I've included it after my sig. It is quite big. -- Ken T. <ktectropy@...> <web-app xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http:// java.sun.com/xml/ns/j2ee/web-app_2_4.xsd' version='2.4' xmlns='http:// java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema- instance'> <display-name>/TimeTracker-production-0.1</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>TimeTracker- production-0.1</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> <filter-name>urlMapping</filter-name><filter- class>org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter</ filter-class> </filter> <filter> <filter-name>grailsWebRequest</filter-name><filter- class>org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter</ filter-class> </filter> <filter-mapping> <filter-name>charEncodingFilter</filter-name><url-pattern>/*</url- pattern> </filter-mapping> <filter-mapping> <filter-name>grailsWebRequest</filter-name><url-pattern>/*</url- pattern><dispatcher>FORWARD</dispatcher><dispatcher>REQUEST</dispatcher> </filter-mapping> <filter-mapping> <filter-name>sitemesh</filter-name><url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>urlMapping</filter-name><url-pattern>/*</url- pattern><dispatcher>FORWARD</dispatcher><dispatcher>REQUEST</dispatcher> </filter-mapping> <listener> <listener- class>org.codehaus.groovy.grails.web.util.Log4jConfigListener</listener- class> </listener> <listener> <listener- class>org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener</ listener-class> </listener> <servlet> <servlet-name>grails</servlet-name><servlet- class>org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet</ servlet-class><load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>gsp</servlet-name><servlet- class>org.codehaus.groovy.grails.web.pages.GroovyPagesServlet</servlet- class> </servlet> <servlet> <servlet-name>grails-errorhandler</servlet-name><servlet- class>org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet</ servlet-class> </servlet> <servlet-mapping> <servlet-name>gsp</servlet-name><url-pattern>*.gsp</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>grails-errorhandler</servlet-name><url-pattern>/ grails-errorhandler</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>grails</servlet-name><url-pattern>*.dispatch</url- pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file><welcome-file>index.jsp</ welcome-file><welcome-file>index.gsp</welcome-file> </welcome-file-list> <error-page> <error-code>500</error-code><location>/grails-errorhandler</ location> </error-page> <jsp-config> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib- uri><taglib-location>/WEB-INF/tld/c.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib- uri><taglib-location>/WEB-INF/tld/fmt.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://www.springframework.org/tags</taglib- uri><taglib-location>/WEB-INF/tld/spring.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://grails.codehaus.org/tags</taglib- uri><taglib-location>/WEB-INF/tld/grails.tld</taglib-location> </taglib> </jsp-config> </web-app> |
|
|
Re: Difficulty deploying Grails war file to GeronimoOn Sun, 27 Sep 2009 03:53:43 +0000, Ken T. wrote:
> I'm trying to deploy a working (but very simple) grails application war > to Geronimo, but with no luck. I've already made the changes to the > geronimo-web.xml file that were specified online, leaving me this: This is actually getting really strange. Once I try to install the war file and then when it fails go to Web App Wars and try to start it again, I'm no longer able to view my installed Web Apps. The war breaks Geronimo. This really shouldn't happen, so I tried installing the latest and greatest Geronimo and I'm having exactly the same problem. -- Ken T. <ktectropy@...> |
|
|
Re: Difficulty deploying Grails war file to GeronimoOn Sun, 27 Sep 2009 18:46:21 +0000, Ken T. wrote:
> On Sun, 27 Sep 2009 03:53:43 +0000, Ken T. wrote: > >> I'm trying to deploy a working (but very simple) grails application war >> to Geronimo, but with no luck. I've already made the changes to the >> geronimo-web.xml file that were specified online, leaving me this: > > This is actually getting really strange. Once I try to install the war > file and then when it fails go to Web App Wars and try to start it > again, I'm no longer able to view my installed Web Apps. The war breaks > Geronimo. > > This really shouldn't happen, so I tried installing the latest and > greatest Geronimo and I'm having exactly the same problem. I've figured out my problem. The necessary entries in the geronimo- web.xml file have changed over time. Thank you for looking into it. For anyone looking for the same information, for 2.1.4 looks something like this: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"> <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1"> <moduleId> <groupId>grailsApp</groupId> <artifactId>TimeTracker</artifactId> <version>0.1</version> <type>war</type> </moduleId> <hidden-classes> <filter>org.springframework</filter> <filter>org.apache.cxf</filter> <filter>org.apache.commons</filter> </hidden-classes> </environment> <context-root>/TimeTracker</context-root> <!-- Only if you are using virtual hosting under jetty --> <virtual-host>www.mydomain.com</virtual-host> </web-app> -- Ken T. <ktectropy@...> |
|
|
Re: Difficulty deploying Grails war file to GeronimoHi Ken, Glad you figured it out. I had played with this a while ago and discovered much something similar. At the time I think I discovered that I could deploy into a Jetty JavaEE assembly by identifying only the springframework classes as hidden and in a JavaEE Tomcat assembly with just the jaxen classes as hidden. One more thing to consider is that you should be able to deploy a Grails war into either the Jetty or Tomcat minimal Geronimo assemblies without any hidden-class entries at all (at least this worked about a year ago - probably on 2.1.3). This might be a good solution if you don't need the additional capabilities in the JavaEE certified assemblies. Joe Ken T. wrote: > On Sun, 27 Sep 2009 18:46:21 +0000, Ken T. wrote: > >> On Sun, 27 Sep 2009 03:53:43 +0000, Ken T. wrote: >> >>> I'm trying to deploy a working (but very simple) grails application war >>> to Geronimo, but with no luck. I've already made the changes to the >>> geronimo-web.xml file that were specified online, leaving me this: >> This is actually getting really strange. Once I try to install the war >> file and then when it fails go to Web App Wars and try to start it >> again, I'm no longer able to view my installed Web Apps. The war breaks >> Geronimo. >> >> This really shouldn't happen, so I tried installing the latest and >> greatest Geronimo and I'm having exactly the same problem. > > I've figured out my problem. The necessary entries in the geronimo- > web.xml file have changed over time. > > Thank you for looking into it. > > For anyone looking for the same information, for 2.1.4 looks something > like this: > > <?xml version="1.0" encoding="UTF-8"?> > <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"> > <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1"> > <moduleId> > <groupId>grailsApp</groupId> > <artifactId>TimeTracker</artifactId> > <version>0.1</version> > <type>war</type> > </moduleId> > <hidden-classes> > <filter>org.springframework</filter> > <filter>org.apache.cxf</filter> > <filter>org.apache.commons</filter> > </hidden-classes> > </environment> > <context-root>/TimeTracker</context-root> > <!-- Only if you are using virtual hosting under jetty --> > <virtual-host>www.mydomain.com</virtual-host> > </web-app> > > > > > |
| Free embeddable forum powered by Nabble | Forum Help |
