geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject Re: Geronimo and Struts 1.2.7
Date Thu, 16 Jun 2005 13:28:36 GMT
	You might try adding a geronimo-jetty.xml with:

<context-priority-classloader>true</context-priority-classloader>

	It may be the case that something's being loaded from the system 
classpath and you want it to be loaded from the web app classpath, and 
this will set it to search the web app classpath first.

Aaron

On Wed, 15 Jun 2005, Neal Sanche wrote:
> Hi All,
> 
> I am currently working hard to get a Struts 1.2.7 application to build 
> and deploy inside Geronimo HEAD. I've made great strides tonight in 
> doing so, but I've run into a problem now, and I'm not sure what's 
> happening. I've bundled all of the struts .jar files and dependecies in 
> my WEB-INF/lib directory inside my .WAR file. I have a bunch of Struts 
> Actions compiled and their classes are written to the WEB-INF/classes 
> directory. My struts based .jsps seem to execute fine, and as long as I 
> don't access and Struts Action classes, I'm fine. But when I do access a 
> struts action, I get the error:
> 
> 
>     HTTP ERROR: 500
> 
> org/apache/struts/action/Action
> 
> RequestURI=/phonebook/Hello.do
> 
> /Powered by Jetty:// <http://jetty.mortbay.org>
> /
> 
> And the console emits the following stack trace:
> 
> 23:16:16,101 WARN  [ServletHandler] Error for /phonebook/Hello.do
> java.lang.NoClassDefFoundError: org/apache/struts/action/Action
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
> 4)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at 
> org.apache.geronimo.jetty.JettyClassLoader.loadClass(JettyClassLoader
> .java:59)
>         at 
> org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.jav
> a:117)
>         at 
> org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.
> java:143)
>         at 
> org.apache.struts.action.RequestProcessor.processActionCreate(Request
> Processor.java:280)
>         at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:218)
>         at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
> 4)
>         at 
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>         at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
> )
>         at 
> org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
> r.java:92)
>         at 
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
> WebApplicationHandler.java:832)
>         at 
> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
> )
>         at 
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
> WebApplicationHandler.java:823)
>         at 
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
> onHandler.java:473)
>         at 
> org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:272)
>         at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:169)
>         at 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.
> java:1063)
>         at 
> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestP
> rocessor.java:263)
>         at 
> org.apache.struts.action.RequestProcessor.processForwardConfig(Reques
> tProcessor.java:386)
>         at 
> org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Ti
> lesRequestProcessor.java:318)
>         at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:229)
>         at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
> 4)
> 
> So what I find freaky about this stack trace is that near the bottom, 
> org.apache.struts.action stuff starts appearing indicating to me that 
> the struts classes are being found, I think. Is there, perhaps, a 
> conflicting Jar inside the Geronimo repository? Is there a way to make 
> the Geronimo classloader only load from within the web application .WAR 
> scope? Any ideas what I'm doing wrong?
> 
> Thanks tons, if you can help me.
> 
> Cheers.
> 
> -Neal
> 
> //
> 

Mime
View raw message