I found the same thing is true with WLS 5.1

John

-----Original Message-----
From: fvdelius [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 10:26 AM
To: struts-user
Cc: fvdelius
Subject: important tip for installing struts within resin!


Now I found a reason for my trouble: I had a copy of struts.jar in 
$RESIN_HOME/lib instead of having it only in my application's 
WEB-INF/lib. This caused resin not to find any application classes. 
After deleting struts.jar from $RESIN_HOME/lib everything works fine.

It costs me half a day to find out, so I hope this hint prevents some 
of you from wasting your time!

-Felix

On Wed, Jun 13, 2001 at 12:13:57PM +0200, Felix von Delius wrote:
> I'm having trouble to bring the struts-example application to work 
with resin-1.2.7 under linux. With Win2K it runs just fine, but when 
doing the same installation under linux, I always catch the exceptions 
appended at the end of this mail.
> 
> According to Scott Ferguson (developer of resin), this is a bug in 
struts, here a quote from the resin mailinglist:
> 
> >It's a struts bug.
> >
> >The current struts code looks like:
> >
> >   Class clazz = Class.forName(actionClass);
> >
> >It should be rewritten to be:
> >
> >   ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
> >   Class clazz = Class.forName(actionClass, true, loader);
> 
> Is this verified by someone else? Is this problem known to the struts 
people and will it be fixed in the nightly build binary release?
> 
> Thanks!
> 
> -Felix
> 
> 
> [2001/06/12 18:39:50] 
org.apache.struts.webapp.example.DatabaseServlet: init
> [2001/06/12 18:39:50] 
org.apache.struts.webapp.example.DatabaseServlet: Initializing database 
servlet
> [2001/06/12 18:39:50] 
org.apache.struts.webapp.example.DatabaseServlet: Loading database from 
'/WEB-INF/database.xml'
> [2001/06/12 18:39:51] 
org.apache.struts.webapp.example.DatabaseServlet: Database load 
exception
> java.lang.ClassNotFoundException: 
org.apache.struts.webapp.example.User
>         at 
org.apache.struts.digester.Digester.startElement(Digester.java:531)
>         at 
com.caucho.xml.ContentHandlerAdapter.startElement(ContentHandlerAdapter.
java:100)
>         at com.caucho.xml.XmlParser.addElement(XmlParser.java:800)
>         at com.caucho.xml.XmlParser.parseElement(XmlParser.java:520)
>         at com.caucho.xml.XmlParser.parseNode(XmlParser.java:325)
>         at com.caucho.xml.XmlParser.parseInt(XmlParser.java:178)
>         at 
com.caucho.xml.AbstractParser.parseDocument(AbstractParser.java:503)
>         at 
com.caucho.xml.AbstractParser.parse(AbstractParser.java:403)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:117)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:71)
>         at 
org.apache.struts.digester.Digester.parse(Digester.java:755)
>         at 
org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet.ja
va:251)
>         at 
org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet.ja
va:175)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:52)
>         at 
com.caucho.server.http.Application.createServlet(Application.java:1741)
>         at 
com.caucho.server.http.Application.loadServlet(Application.java:1705)
>         at 
com.caucho.server.http.Application.initServlets(Application.java:1122)
>         at 
com.caucho.server.http.Application.init(Application.java:1075)
>         at 
com.caucho.server.http.VirtualHost.init(VirtualHost.java:382)
>         at 
com.caucho.server.http.ServletServer.initHosts(ServletServer.java:439)
>         at 
com.caucho.server.http.ServletServer.init(ServletServer.java:343)
>         at 
com.caucho.server.http.ServletServer.<init>(ServletServer.java:186)
>         at 
com.caucho.server.http.ResinServer.init(ResinServer.java:286)
>         at 
com.caucho.server.http.ResinServer.main(ResinServer.java:868)
>         at com.caucho.server.http.HttpServer.main(HttpServer.java:93)
> [2001/06/12 18:39:51] Cannot load database from 
'/WEB-INF/database.xml'
> javax.servlet.UnavailableException: Cannot load database from 
'/WEB-INF/database.xml'
>         at 
org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet.ja
va:180)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:52)
>         at 
com.caucho.server.http.Application.createServlet(Application.java:1741)
>         at 
com.caucho.server.http.Application.loadServlet(Application.java:1705)
>         at 
com.caucho.server.http.Application.initServlets(Application.java:1122)
>         at 
com.caucho.server.http.Application.init(Application.java:1075)
>         at 
com.caucho.server.http.VirtualHost.init(VirtualHost.java:382)
>         at 
com.caucho.server.http.ServletServer.initHosts(ServletServer.java:439)
>         at 
com.caucho.server.http.ServletServer.init(ServletServer.java:343)
>         at 
com.caucho.server.http.ServletServer.<init>(ServletServer.java:186)
>         at 
com.caucho.server.http.ResinServer.init(ResinServer.java:286)
>         at 
com.caucho.server.http.ResinServer.main(ResinServer.java:868)
>         at com.caucho.server.http.HttpServer.main(HttpServer.java:93)
> 
> 

Reply via email to