struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10501] - Error running struts under JRun 3.1
Date Tue, 23 Jul 2002 00:12:53 GMT
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 sumibcay@innotiv.com  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:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message