DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10501>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10501

Error running struts under JRun 3.1





------- Additional Comments From [EMAIL PROTECTED]  2002-07-23 00:12 -------
I've run into a problem similar to this before. I found that JRun3.1 was not 
setting the web-inf classloader through Thread.setContextClassLoader() when 
loading the servlet on startup. If this is  not set, then i believe the logger 
will try to load its classes through the primordial classloader, but this is 
not where the commons-logging.jar is located, so you get a 
ClassNotFoundException. I've pointed this problem out to the JRun support 
people, there suggestion was to switch to JRun 4 which supports the Servlet 2.3 
spec. I've tried out struts1.1 beta1 with JRun 4 and it all works fine. If you 
are stuck with JRun3.1, it looks like you may be stuck with Struts1.0...or you 
can modify ActionServlet to set the ContextLoader in its init method before 
initialization of its logging classes. 

Of course this hack does not belong in Struts. But since you can't get to the 
JRun source code...

init(ServletConfig sc)
{
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
..

//INIT logging here

}

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to