File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat does not find my custom method

 
ron cola
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new in JSP and I had some custom made libraries.
When I call the old methods everything worked fine.
I add new methods
first, were not find by tomcat.
I shuted down the tomcat server,
I compiled the library.
I started tomcat once again, but I get.
java.lang.NoSuchMethodError: addIndex
I added the same code on the command line (the call to the method) and in the JSP page.

if I embeed this code on the jsp page, it works fine.
What I am doing wrong???
Thanks for your help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.NoSuchMethodError: addIndex

This error usually means that the method was found during compilation, but not at run-time. So, first thing to do is to be absolutely sure that your new class is making its way to the right place for Tomcat to pick it up as part of the classpath.
hth,
bear
 
ron cola
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think must be there. I have a made a ln to the
/WEB-INF/classes/MyLib and the class is there.

I did rm *.class
I recompiled all
I tried this method from the promt line (my path is taken from )
set PATH=${JAVA_HOME}/bin:${PATH} (but this is for the prompt version).
I don't know how tomcat works for that.
old methods works, but not the new one.
must be something trivial, but I can't find the clue.
Thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started tomcat once again, but I get.
java.lang.NoSuchMethodError: addIndex

Exactly where did that message appear? In a log file, on the console screen, in a web page? When did it appear? When Tomcat started, when a page was accessed?
Bill
 
ron cola
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by William Brogden:

Exactly where did that message appear? In a log file, on the console screen, in a web page? When did it appear? When Tomcat started, when a page was accessed?
Bill

It comes when you call the jsp page that have the "new" method.
and the error is catch by this page
<%@ page isErrorPage="true" %>

here is when I get the message from.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic