Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tomcat-3.2.3: NoSuchMethodError

 
Liza Boa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18014
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Nata Van
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic