RE: Using Digester in a Tomcat project causes server not to start?
Howdy, I think you're on the right track regarding the IDE plug-in's classpath mangling. It will be good to report this to the plug-in's authors. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Kruse, Matt [mailto:[EMAIL PROTECTED] >Sent: Tuesday, September 23, 2003 10:26 AM >To: Tomcat Users List >Subject: RE: Using Digester in a Tomcat project causes server not to start? > >> From: Filip Hanik [mailto:[EMAIL PROTECTED] >> not sure why someone would go in and mock with the Tomcat >> source when there is no need to :) > >My goal was simply to get it to WORK so I could continue development. This >solution worked for me. I'm not at all confident that it's the correct or >ideal solution. > >> have fun maintaining upgrades ;) > >For me, this won't matter, because this is just a development system on my >local box. Production deployment will be on Websphere and this issue won't >even matter. > >> We use the digester in our webapp without any problems what >> so ever, we simple place it in WEB-INF/lib > >I think I've further isolated the problem to be tied to the Tomcat plugin >for Eclipse. I'm not sure of this, but I suspect that the classpaths are >different or something which causes the commons-digester.jar to be found in >the WEB-INF/lib directory before the server/lib directory, so Catalina uses >the wrong one. > >I just tested this, using the old catalina.jar file without my changes. >Server starts fine in stand-alone mode, but inside Eclipse the Digester >can't find org.apache.catalina.core.StandardServer > >> From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >> Nonetheless, it's good to see someone actually put his money where his >> mouth is, report a problem they're having, try to fix it, >> come up with a >> working solution (even if breaks something else), and report their >> findings. I wish more people did that. > >Thanks -- so do I! I found multiple references to the problem itself, but >none to a solution, except for the proposed patch on bugzilla. That headed >me in the right direction, which was great. > >As I said originally, I'm ignorant about some of the issues involved (this >is my first time using Tomcat, and the first time hearing about these >different classloaders) so my fix may or may not be appropriate. But if >someone like me searches the list archives later and finds the original >post, at least they'll find my hack too, and maybe save a bunch of head >scratching :) > >Matt Kruse This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Digester in a Tomcat project causes server not to start ?
> From: Filip Hanik [mailto:[EMAIL PROTECTED] > not sure why someone would go in and mock with the Tomcat > source when there is no need to :) My goal was simply to get it to WORK so I could continue development. This solution worked for me. I'm not at all confident that it's the correct or ideal solution. > have fun maintaining upgrades ;) For me, this won't matter, because this is just a development system on my local box. Production deployment will be on Websphere and this issue won't even matter. > We use the digester in our webapp without any problems what > so ever, we simple place it in WEB-INF/lib I think I've further isolated the problem to be tied to the Tomcat plugin for Eclipse. I'm not sure of this, but I suspect that the classpaths are different or something which causes the commons-digester.jar to be found in the WEB-INF/lib directory before the server/lib directory, so Catalina uses the wrong one. I just tested this, using the old catalina.jar file without my changes. Server starts fine in stand-alone mode, but inside Eclipse the Digester can't find org.apache.catalina.core.StandardServer > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Nonetheless, it's good to see someone actually put his money where his > mouth is, report a problem they're having, try to fix it, > come up with a > working solution (even if breaks something else), and report their > findings. I wish more people did that. Thanks -- so do I! I found multiple references to the problem itself, but none to a solution, except for the proposed patch on bugzilla. That headed me in the right direction, which was great. As I said originally, I'm ignorant about some of the issues involved (this is my first time using Tomcat, and the first time hearing about these different classloaders) so my fix may or may not be appropriate. But if someone like me searches the list archives later and finds the original post, at least they'll find my hack too, and maybe save a bunch of head scratching :) Matt Kruse
RE: Using Digester in a Tomcat project causes server not to start?
Howdy, >I'm very interested to hear what Tomcat gurus/commiters think of this I for one think it's unneeded. Like others, I haven't run into the problems Senor Kruse did, have Digester working fine in multiple webapps without modifying tomcat's source or installation. Nonetheless, it's good to see someone actually put his money where his mouth is, report a problem they're having, try to fix it, come up with a working solution (even if breaks something else), and report their findings. I wish more people did that. >Does this break something else? >> 1) in Catalina.java: >> >> /** >> * Create and configure the Digester we will be using for startup. >> */ >> protected Digester createStartDigester() { >> >> // Initialize the digester >> Digester digester = new Digester(); >> + digester.setClassLoader(this.getClass().getClassLoader()); I think this should be OK. >> 2) in ContextConfig.java: >> >> /** >> * Create (if necessary) and return a Digester configured >> to process the >> * web application deployment descriptor (web.xml). >> */ >> private static Digester createWebDigester() { >> >> URL url = null; >> Digester webDigester = new Digester(); >> + >> + webDigester.setClassLoader(ContextConfig.class.getClassLoader()); This I'm suspicious of. The ContextConfig classloader might be different than the webapp classloader. The webapp classloader should process web.xml. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Digester in a Tomcat project causes server not to start?
not sure why someone would go in and mock with the Tomcat source when there is no need to :) have fun maintaining upgrades ;) We use the digester in our webapp without any problems what so ever, we simple place it in WEB-INF/lib We have the following jars in WEB-inf/lib commons-beanutils.jar commons-collections.jar commons-digester.jar commons-logging-api.jar commons-logging.jar Filip - Original Message - From: "Mike Curwen" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Monday, September 22, 2003 4:12 PM Subject: RE: Using Digester in a Tomcat project causes server not to start? I'm very interested to hear what Tomcat gurus/commiters think of this mod. Given the links that describe the problem, and because I just have this feeling that classloading issues are so replete with 'good intentioned, but ultimately doomed architectures'... ya know... here's someone that bothered to crack the hood open, found the source of his difficulties, and fixed them. Does this break something else? Is it against spec? Just curious. > -Original Message- > From: Kruse, Matt [mailto:[EMAIL PROTECTED] > Sent: Monday, September 22, 2003 3:52 PM > To: [EMAIL PROTECTED] > Subject: RE: Using Digester in a Tomcat project causes server > not to start? > > > I have solved the problem below. The solution involved > changing a couple of the Tomcat source files due to Digester > instances not using the correct Classloader upon Tomcat startup. > > The changes I made are as follows: > > 1) in Catalina.java: > > /** > * Create and configure the Digester we will be using for startup. > */ > protected Digester createStartDigester() { > > // Initialize the digester > Digester digester = new Digester(); > + digester.setClassLoader(this.getClass().getClassLoader()); > > 2) in ContextConfig.java: > > /** > * Create (if necessary) and return a Digester configured > to process the > * web application deployment descriptor (web.xml). > */ > private static Digester createWebDigester() { > > URL url = null; > Digester webDigester = new Digester(); > + > + webDigester.setClassLoader(ContextConfig.class.getClassLoader()); > > 3) Replace the .class files from the above two files into > c:\tomcat\server\lib\Catalina.jar > > That's it! My application now starts up correctly and uses > its internal instance of digester doesn't conflict with > Tomcat's version. > > And in the process, I've learned a lot about Classloaders :) > > Matt Kruse > > > > -Original Message- > > From: Kruse, Matt > > Sent: Monday, September 22, 2003 11:08 AM > > To: '[EMAIL PROTECTED]' > > Subject: Using Digester in a Tomcat project causes server not > > to start? > > > > > > I know I'm ignorant in some areas of this problem, so please > > forgive me if I don't explain it well or if I'm missing > > something obvious! > > > > PROBLEM: Tomcat won't startup (via Eclipse plugin) when > > Apache's commons-digester.jar is included as a project lib. > > > > QUESTION: How can I use the Digester in my project with Tomcat? > > > > SEE ALSO (appear to reference the same problem): > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg4 > > 5756.html > > http://groups.google.com/groups?selm=c09cb3fc.0307290659.57359 > > 042%40posting.google.com > > http://www.mail-archive.com/[EMAIL PROTECTED]/ms > > g02848.html > > > > I've narrowed it down to this being the source of the > > problem. It looks like it has something to do with > > ClassLoaders or something, but I don't know much about that. > > I'm confused. > > > > It's a problem that others have apparently encountered. A > > patch to Catalina may solve the problem, but I haven't seen > > any posts or messages detailing a work-around. > > > > Is there a work-around I can use _NOW_ to make my project > > work in Tomcat? > > > > Thanks! > > > > Matt Kruse > > > > PS: > > > > This is the error I get when including Digester in the > > dependencies and trying to start Tomcat: > > > > 2003-09-22 10:22:29,962 0[main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,978 16 [main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,978 16 [main] DEBUG > > org.apache.com
RE: Using Digester in a Tomcat project causes server not to start?
I'm very interested to hear what Tomcat gurus/commiters think of this mod. Given the links that describe the problem, and because I just have this feeling that classloading issues are so replete with 'good intentioned, but ultimately doomed architectures'... ya know... here's someone that bothered to crack the hood open, found the source of his difficulties, and fixed them. Does this break something else? Is it against spec? Just curious. > -Original Message- > From: Kruse, Matt [mailto:[EMAIL PROTECTED] > Sent: Monday, September 22, 2003 3:52 PM > To: [EMAIL PROTECTED] > Subject: RE: Using Digester in a Tomcat project causes server > not to start? > > > I have solved the problem below. The solution involved > changing a couple of the Tomcat source files due to Digester > instances not using the correct Classloader upon Tomcat startup. > > The changes I made are as follows: > > 1) in Catalina.java: > > /** > * Create and configure the Digester we will be using for startup. > */ > protected Digester createStartDigester() { > > // Initialize the digester > Digester digester = new Digester(); > + digester.setClassLoader(this.getClass().getClassLoader()); > > 2) in ContextConfig.java: > > /** > * Create (if necessary) and return a Digester configured > to process the > * web application deployment descriptor (web.xml). > */ > private static Digester createWebDigester() { > > URL url = null; > Digester webDigester = new Digester(); > + > + webDigester.setClassLoader(ContextConfig.class.getClassLoader()); > > 3) Replace the .class files from the above two files into > c:\tomcat\server\lib\Catalina.jar > > That's it! My application now starts up correctly and uses > its internal instance of digester doesn't conflict with > Tomcat's version. > > And in the process, I've learned a lot about Classloaders :) > > Matt Kruse > > > > -Original Message- > > From: Kruse, Matt > > Sent: Monday, September 22, 2003 11:08 AM > > To: '[EMAIL PROTECTED]' > > Subject: Using Digester in a Tomcat project causes server not > > to start? > > > > > > I know I'm ignorant in some areas of this problem, so please > > forgive me if I don't explain it well or if I'm missing > > something obvious! > > > > PROBLEM: Tomcat won't startup (via Eclipse plugin) when > > Apache's commons-digester.jar is included as a project lib. > > > > QUESTION: How can I use the Digester in my project with Tomcat? > > > > SEE ALSO (appear to reference the same problem): > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg4 > > 5756.html > > http://groups.google.com/groups?selm=c09cb3fc.0307290659.57359 > > 042%40posting.google.com > > http://www.mail-archive.com/[EMAIL PROTECTED]/ms > > g02848.html > > > > I've narrowed it down to this being the source of the > > problem. It looks like it has something to do with > > ClassLoaders or something, but I don't know much about that. > > I'm confused. > > > > It's a problem that others have apparently encountered. A > > patch to Catalina may solve the problem, but I haven't seen > > any posts or messages detailing a work-around. > > > > Is there a work-around I can use _NOW_ to make my project > > work in Tomcat? > > > > Thanks! > > > > Matt Kruse > > > > PS: > > > > This is the error I get when including Digester in the > > dependencies and trying to start Tomcat: > > > > 2003-09-22 10:22:29,962 0[main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,978 16 [main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,978 16 [main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,993 31 [main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,993 31 [main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,993 31 [main] DEBUG > > org.apache.commons.digester.Digester - addRuleSet() with no > > namespace URI > > 2003-09-22 10:22:29,993 31 [main] DEBUG > > org.apache.commons.digester.Digeste
Re: Using Digester in a Tomcat project causes server not to start?
It would take too long to tell you how to use commons-digester with Tomcat (or whatever other application); I'm using it with a Struts application running under Tomcat and it works greately. I put it under WEB-INF/lib folder and I don't have it under common/lib Marco - Original Message - From: "Kruse, Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 22, 2003 5:03 PM Subject: Using Digester in a Tomcat project causes server not to start? > I know I'm ignorant in some areas of this problem, so please forgive me if I > don't explain it well or if I'm missing something obvious! > > PROBLEM: Tomcat won't startup (via Eclipse plugin) when Apache's > commons-digester.jar is included as a project lib. > > QUESTION: How can I use the Digester in my project with Tomcat? > > SEE ALSO (appear to reference the same problem): > http://www.mail-archive.com/[EMAIL PROTECTED]/msg45756.html > http://groups.google.com/groups?selm=c09cb3fc.0307290659.57359042%40posting. > google.com > http://www.mail-archive.com/[EMAIL PROTECTED]/msg02848.html > > I've narrowed it down to this being the source of the problem. It looks like > it has something to do with ClassLoaders or something, but I don't know much > about that. I'm confused. > > It's a problem that others have apparently encountered. A patch to Catalina > may solve the problem, but I haven't seen any posts or messages detailing a > work-around. > > Is there a work-around I can use _NOW_ to make my project work in Tomcat? > > Thanks! > > Matt Kruse > > PS: > > This is the error I get when including Digester in the dependencies and > trying to start Tomcat: > > 2003-09-22 10:22:29,962 0[main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,978 16 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,978 16 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no namespace URI > 2003-09-22 10:22:30,071 109 [main] DEBUG > org.apache.commons.digester.Digester.sax - > setDocumentLocator(org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@ > 97d01f) > 2003-09-22 10:22:30,071 109 [main] DEBUG > org.apache.commons.digester.Digester.sax - startDocument() > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester.sax - > startPrefixMapping(xml,http://www.w3.org/XML/1998/namespace) > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester.sax - > startPrefixMapping(xmlns,http://www.w3.org/2000/xmlns/) > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester.sax - startElement(,,Server) > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - Pushing body text '' > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - New match='Server' > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - Fire begin() for > ObjectCreateRule[className=org.apache.catalina.core.StandardServer, > attributeName=className] > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - [ObjectCreateRule]{Server}New > org.apache.catalina.core.StandardServer > 2003-09-22 10:22:30,103 141 [main] ERROR > org.apache.commons.digester.Digester - Begin event threw exception > java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer > at java.net.URLClassLoader$1.run(URLClassLoader.java:198) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:186) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) > at java.lang.ClassLoader.loadClass(ClassLoader.java:262) > at > org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252 > ) > at org.apache.commons.digester.Rule.begin(Rule.java:200) > at org.apache.commons.digester.Digester.startElement(Digester.java:1268) > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) > at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) > at > org.apache.xerces.impl.XMLDocume
RE: Using Digester in a Tomcat project causes server not to start ?
I have solved the problem below. The solution involved changing a couple of the Tomcat source files due to Digester instances not using the correct Classloader upon Tomcat startup. The changes I made are as follows: 1) in Catalina.java: /** * Create and configure the Digester we will be using for startup. */ protected Digester createStartDigester() { // Initialize the digester Digester digester = new Digester(); + digester.setClassLoader(this.getClass().getClassLoader()); 2) in ContextConfig.java: /** * Create (if necessary) and return a Digester configured to process the * web application deployment descriptor (web.xml). */ private static Digester createWebDigester() { URL url = null; Digester webDigester = new Digester(); + webDigester.setClassLoader(ContextConfig.class.getClassLoader()); 3) Replace the .class files from the above two files into c:\tomcat\server\lib\Catalina.jar That's it! My application now starts up correctly and uses its internal instance of digester doesn't conflict with Tomcat's version. And in the process, I've learned a lot about Classloaders :) Matt Kruse > -Original Message- > From: Kruse, Matt > Sent: Monday, September 22, 2003 11:08 AM > To: '[EMAIL PROTECTED]' > Subject: Using Digester in a Tomcat project causes server not > to start? > > > I know I'm ignorant in some areas of this problem, so please > forgive me if I don't explain it well or if I'm missing > something obvious! > > PROBLEM: Tomcat won't startup (via Eclipse plugin) when > Apache's commons-digester.jar is included as a project lib. > > QUESTION: How can I use the Digester in my project with Tomcat? > > SEE ALSO (appear to reference the same problem): > http://www.mail-archive.com/[EMAIL PROTECTED]/msg4 > 5756.html > http://groups.google.com/groups?selm=c09cb3fc.0307290659.57359 > 042%40posting.google.com > http://www.mail-archive.com/[EMAIL PROTECTED]/ms > g02848.html > > I've narrowed it down to this being the source of the > problem. It looks like it has something to do with > ClassLoaders or something, but I don't know much about that. > I'm confused. > > It's a problem that others have apparently encountered. A > patch to Catalina may solve the problem, but I haven't seen > any posts or messages detailing a work-around. > > Is there a work-around I can use _NOW_ to make my project > work in Tomcat? > > Thanks! > > Matt Kruse > > PS: > > This is the error I get when including Digester in the > dependencies and trying to start Tomcat: > > 2003-09-22 10:22:29,962 0[main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,978 16 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,978 16 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:29,993 31 [main] DEBUG > org.apache.commons.digester.Digester - addRuleSet() with no > namespace URI > 2003-09-22 10:22:30,071 109 [main] DEBUG > org.apache.commons.digester.Digester.sax - > setDocumentLocator(org.apache.xerces.parsers.AbstractSAXParser > [EMAIL PROTECTED]) > 2003-09-22 10:22:30,071 109 [main] DEBUG > org.apache.commons.digester.Digester.sax - startDocument() > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester.sax - > startPrefixMapping(xml,http://www.w3.org/XML/1998/namespace) > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester.sax - > startPrefixMapping(xmlns,http://www.w3.org/2000/xmlns/) > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester.sax - startElement(,,Server) > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - Pushing body text '' > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - New match='Server' > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - Fire begin() for > ObjectCreateRule[className=org.apache.catalina.core.StandardSe > rver, attributeName=className] > 2003-09-22 10:22:30,103 141 [main] DEBUG > org.apache.commons.digester.Digester - > [ObjectCreateRule]{Server}New org.apache.catal
RE: Using Digester in a Tomcat project causes server not to start ?
> This works fine for me. It is very obvious: just try one > example Struts > WAR (which has commons-digester.jar), and it will work fine. I'm not sure why this would work, but I admittedly don't know much about WAR files. Could have something to do with when they are processed during startup, etc? The problem I'm experiencing isn't imaginary, though. See these URL's: http://www.mail-archive.com/[EMAIL PROTECTED]/msg45756.html http://groups.google.com/groups?selm=c09cb3fc.0307290659.57359042%40posting. google.com http://www.mail-archive.com/[EMAIL PROTECTED]/msg02848.html See the Bugzilla entry for specifics: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22300 Matt
Re: Using Digester in a Tomcat project causes server not to start ?
Kruse, Matt wrote: What tomcat version? I've tried 4.1.27 and 5.0.9 with the same results. Where's the digester jar that ships with tomcat? c:\tomcat\server\lib\commons-digester.jar You can't have more than one digest jar in the classloader hierarchy. So keep yours in WEB-INF/lib and make sure tomcat's is in $CATALINA_HOME/server/lib (not commons/lib or shared/lib). I do have a copy of the jar file in my project's WEB-INF\lib directory. That is what is causing the problem. If I take the jar file out of that directory, the server starts up fine, but my project won't run because it can't find the Digester class. If I directly reference the commons-digester.jar in the path above, my project will compile just fine, but Tomcat once again files to startup. This works fine for me. It is very obvious: just try one example Struts WAR (which has commons-digester.jar), and it will work fine. -- x Rémy Maucherat Senior Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Digester in a Tomcat project causes server not to start ?
> What tomcat version? I've tried 4.1.27 and 5.0.9 with the same results. >Where's the digester jar that ships with tomcat? c:\tomcat\server\lib\commons-digester.jar > You can't have more than one digest jar in the classloader hierarchy. > So keep yours in WEB-INF/lib and make sure tomcat's is in > $CATALINA_HOME/server/lib (not commons/lib or shared/lib). I do have a copy of the jar file in my project's WEB-INF\lib directory. That is what is causing the problem. If I take the jar file out of that directory, the server starts up fine, but my project won't run because it can't find the Digester class. If I directly reference the commons-digester.jar in the path above, my project will compile just fine, but Tomcat once again files to startup. Thanks, Matt
RE: Using Digester in a Tomcat project causes server not to start?
Howdy, What tomcat version? Where's the digester jar that ships with tomcat? You can't have more than one digest jar in the classloader hierarchy. So keep yours in WEB-INF/lib and make sure tomcat's is in $CATALINA_HOME/server/lib (not commons/lib or shared/lib). Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Kruse, Matt [mailto:[EMAIL PROTECTED] >Sent: Monday, September 22, 2003 12:03 PM >To: [EMAIL PROTECTED] >Subject: Using Digester in a Tomcat project causes server not to start? > >I know I'm ignorant in some areas of this problem, so please forgive me if >I >don't explain it well or if I'm missing something obvious! > >PROBLEM: Tomcat won't startup (via Eclipse plugin) when Apache's >commons-digester.jar is included as a project lib. > >QUESTION: How can I use the Digester in my project with Tomcat? > >SEE ALSO (appear to reference the same problem): >http://www.mail-archive.com/[EMAIL PROTECTED]/msg45756.html >http://groups.google.com/groups?selm=c09cb3fc.0307290659.57359042%40pos ting >. >google.com >http://www.mail-archive.com/[EMAIL PROTECTED]/msg02848.ht ml > >I've narrowed it down to this being the source of the problem. It looks >like >it has something to do with ClassLoaders or something, but I don't know >much >about that. I'm confused. > >It's a problem that others have apparently encountered. A patch to Catalina >may solve the problem, but I haven't seen any posts or messages detailing a >work-around. > >Is there a work-around I can use _NOW_ to make my project work in Tomcat? > >Thanks! > >Matt Kruse > >PS: > >This is the error I get when including Digester in the dependencies and >trying to start Tomcat: > >2003-09-22 10:22:29,962 0[main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,978 16 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,978 16 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,993 31 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,993 31 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,993 31 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,993 31 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,993 31 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:29,993 31 [main] DEBUG >org.apache.commons.digester.Digester - addRuleSet() with no namespace URI >2003-09-22 10:22:30,071 109 [main] DEBUG >org.apache.commons.digester.Digester.sax - >setDocumentLocator(org.apache.xerces.parsers.AbstractSAXParser$LocatorP roxy >@ >97d01f) >2003-09-22 10:22:30,071 109 [main] DEBUG >org.apache.commons.digester.Digester.sax - startDocument() >2003-09-22 10:22:30,103 141 [main] DEBUG >org.apache.commons.digester.Digester.sax - >startPrefixMapping(xml,http://www.w3.org/XML/1998/namespace) >2003-09-22 10:22:30,103 141 [main] DEBUG >org.apache.commons.digester.Digester.sax - >startPrefixMapping(xmlns,http://www.w3.org/2000/xmlns/) >2003-09-22 10:22:30,103 141 [main] DEBUG >org.apache.commons.digester.Digester.sax - startElement(,,Server) >2003-09-22 10:22:30,103 141 [main] DEBUG >org.apache.commons.digester.Digester - Pushing body text '' >2003-09-22 10:22:30,103 141 [main] DEBUG >org.apache.commons.digester.Digester - New match='Server' >2003-09-22 10:22:30,103 141 [main] DEBUG >org.apache.commons.digester.Digester - Fire begin() for >ObjectCreateRule[className=org.apache.catalina.core.StandardServer, >attributeName=className] >2003-09-22 10:22:30,103 141 [main] DEBUG >org.apache.commons.digester.Digester - [ObjectCreateRule]{Server}New >org.apache.catalina.core.StandardServer >2003-09-22 10:22:30,103 141 [main] ERROR >org.apache.commons.digester.Digester - Begin event threw exception >java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer >at java.net.URLClassLoader$1.run(URLClassLoader.java:198) >at java.security.AccessController.doPrivileged(Native Method) >at java.net.URLClassLoader.findClass(URLClassLoader.java:186) >at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) >at java.lang.ClassLoader.loadClass(ClassLoader.java:262) >at >org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.jav a:25 >2 >) >at org.apache.commons.digester.Rule.begin(Rule.java:200) >at org.apache.commons.digester.Digester.startElement(Digester.java:1268) >at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) >at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) >at >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scan