Two Laptop Bag
The moose likes Servlets and the fly likes tomcat-3.2.3: NoSuchMethodError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "tomcat-3.2.3: NoSuchMethodError" Watch "tomcat-3.2.3: NoSuchMethodError" New topic
Author

tomcat-3.2.3: NoSuchMethodError

Liza Boa
Greenhorn

Joined: Aug 16, 2001
Posts: 23
Hello
I developped a piece of code and would like to wrap it in a servlet. When testing the program from the commandline (using main), everything works fine. But whet I test it from the servlet, I get a NoSuchMethodError.
I'm wondering if this could be a classpath-issue, due to the fact that tomcat uses it's own jars?
Thanx for every hint!
***
Liza
StackTrace:
java.lang.NoSuchMethodError
at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.addNode(DOM2DTM.java:262)
at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.<init>(DOM2DTM.java:151)
at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(ETMManagerDefault.java:189)
at org.apache.xml.dtm.ref.DTMManagerDefault.getDTMHandleFromNode(DTMMangerDefault.java:438)
at org.apache.xpath.XPathContext.getDTMHandleFromNode(XPathContext.java:195)
at org.apache.xpath.XPathAPI.eval(XPathAPI.java:274)
at org.apache.xpath.XPathAPI.selectNodeIterator(XPathAPI.java:124)
at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:104)
at NextSide.determineNextSide(NextSide.java:116)
at NextSide.<init>(NextSide.java:99)
at UserInfo.userInfo(UserInfo.java:157)
at ModulServlet.doGet(ModulServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416(
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17038
    
  26

Yep, I'd check out the CLASSPATH. The rules on what gets into a JSP/servlet's CLASSPATH change from Tomcat 3 to Tomcat 4, and I believe that conflicts with different DOM classes may have been one of the reasons why!


An IDE is no substitute for an Intelligent Developer.
Nata Van
Greenhorn

Joined: Aug 06, 2001
Posts: 3
hi,
move xerces.jar into the tomcat's lib directory and delete the dom1 parsers parser.jar and jaxp.jar (or rename them in z_parser.jar and z_jaxp.jar., but tomcat-3.x should only use one xml parser.
best
Nata
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: tomcat-3.2.3: NoSuchMethodError
 
It's not a secret anymore!