struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JEWea...@thoughtworks.com
Subject Re: Digester throwing ClassNotFoundException for ActionFormBean
Date Thu, 16 Aug 2001 16:50:09 GMT

Hi,

Just wanted to say that I am at exactly this same point now.  Thanks for
the tip, Martin, regarding the older jaxp.jar that was lurking in the
Tomcat 3.2.3 lib - that resolved my earlier problem with running the
nightly build under Tomcat.  Now I have Todd's problem ;->.  I have gotten
the same exception on the ActionFormBean using both Xerces and Xalan -
latest versions.

I have gotten around this exception by doing the verbotten - including the
struts.jar and commons jars in the tomcat lib / classpath.  That should
tell us something about the nature of the problem in the first place...  In
any case, I think the "no additional steps required" statement under Tomcat
3.2.1+ on the installation page may be suspect ;->.

Jim Weaver
Software Developer - ThoughtWorks



                                                                                         
                                                  
                    "Hough, Matthew"                                                     
                                                  
                    <Matthew.Hough@M        To:     "'struts-user@jakarta.apache.org'"
<struts-user@jakarta.apache.org>                     
                    aritz.com>              cc:                                       
                                                     
                                            Subject:     Re: Digester throwing ClassNotFoundException
for ActionFormBean                    
                    08/16/2001 10:00                                                     
                                                  
                    AM                                                                   
                                                  
                    Please respond                                                       
                                                  
                    to struts-user                                                       
                                                  
                                                                                         
                                                  
                                                                                         
                                                  




I'm using Xerces 1.4.* and Xalan 2.2.*.  I believe both implement JAXP 1.1.


Thanks,
Todd





> Which version of JAXP and Xerces are you using? The nightly builds
require
> JAXP 1.1, so you may find you need a newer version. See the Struts
> installation page for details:
>
> http://jakarta.apache.org/struts/installation.html
>
> Martin.





----- Original Message -----
From: "Hough, Matthew" <Matthew.Hough@Maritz.com>
To: <struts-user@jakarta.apache.org>
Sent: Wednesday, August 15, 2001 2:13 PM
Subject: Digester throwing ClassNotFoundException for ActionFormBean





> I'm using JRun 3.0 SP2 on WinNT 4 with the 8/14 nightly build of Struts.
>
>
> With all of the commons-*.jar and struts.jar in WEB-INF/lib, I get a
> stack trace showing ClassNotFoundException for ActionFormBean when JRun
> attempts to load-on-startup the ActionServlet.
>
> If I remove the load-on-startup from my web.xml I stop getting the
> ClassNotFoundException but get that org.apache.struts.action.MESSAGE
> couldn't be found error.
>
> As a workaround I've included all the struts jars and my WEB-INF/classes
> directory in the server classpath and it seems to work fine but I'm
> pretty sure that I can't hot deploy anymore.
>
> From the stack trace I see ActionServlet call Digester which calls down
> through JAXP and Xerces until it gets to Digester.startElement and
> throws the ClassNotFoundException.  I'm wondering if Xerces is loading
> funny or somehow it's Xerces classloader thats being used to search for
> ActionFormBean instead of my web app's classloader...  I have to put
> xerces and xalan first in my server classpath so it gets used when I use
> JAXP.  But it seems like my application should work as long as the
> Struts classes are loaded in my web apps classloader because (as I
> understand it) child classloaders will ask their parent if they have a
> class but a parent wont ask a child.
>
> I included my stack trace below:
>
> 08/15 11:05:07 error (JRun) Could not pre-load servlet: action
> [javax.servlet.ServletException: Parsing error processing resource path
> /WEB-INF/struts-config.xml]
>
> [1]java.lang.ClassNotFoundException:
> org.apache.struts.action.ActionFormBean
>         at
> org.apache.commons.digester.Digester.startElement(Digester.java:627)
>         at
> org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
>         at
> org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVal
> idator.java:1197)
>         at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentSc
> anner.java:1862)
>         at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc
> h(XMLDocumentScanner.java:1238)
>         at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan
> ner.java:381)
>         at
> org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:374)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:192)
>         at org.apache.commons.digester.Digester.parse(Digester.java:859)
>
>         at
> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:12
> 72)
>         at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:459)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
>         at
> allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JR
> unServletLoader.java:203)
>         at
> allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JR
> unServletLoader.java:161)
>         at
> allaire.jrun.servlet.JRunServletLoader.loadServlet(../servlet/JRunServle
> tLoader.java:149)
>         at
> allaire.jrun.servlet.JRunSE.getServletReference(../servlet/JRunSE.java:1
> 706)
>         at
> allaire.jrun.servlet.JRunSE.preloadServlets(../servlet/JRunSE.java:1372)
>
>         at allaire.jrun.servlet.JRunSE.init(../servlet/JRunSE.java:237)
>         at allaire.jrun.ServletService.init(../ServletService.java:66)
>         at allaire.jrun.ServletService.init(../ServletService.java:31)
>         at
> allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JR
> unServletLoader.java:203)
>         at
> allaire.jrun.servlet.JRunSE.initService(../servlet/JRunSE.java:892)
>         at
> allaire.jrun.servlet.JRunSE.initServices(../servlet/JRunSE.java:859)
>         at
> allaire.jrun.servlet.JvmContext.initServices(../servlet/JvmContext.java:
> 130)
>         at allaire.jrun.servlet.JRunSE.init(../servlet/JRunSE.java:223)
>         at
> allaire.jrun.servlet.JvmContext.init(../servlet/JvmContext.java:69)
>         at allaire.jrun.ServletService.init(../ServletService.java:66)
>         at allaire.jrun.ServletService.init(../ServletService.java:31)
>         at JRun.main(../../../JRun.java:172)
>
>
> Thanks for any help you can offer.
>
> Todd Hough
>
>




Mime
View raw message