tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Davison <peterdavi...@rogers.com>
Subject Re: Method not found in class error
Date Thu, 20 Jun 2002 12:53:05 GMT
AFAIK tomcat resets your system classpath before starting and replaces it with
just the classpath it needs to operate.  AFAIK it has its own classloader and
will load classes from $CATALINA_HOME/lib, and then will look under the
individual webapp areas (eg. $CATALINA_HOME/webapps/mywebapp/WEB-INF/lib for jar
files and $CATALINA_HOME/webapps/mywebapp/WEB-INF/classes) and I think it does
so in that order.

As far as finding out which jar file contains your class you can use unzip -l
(on Unix) to list the contents of a jar file.  

You said in your previous post that you knew the method was defined in the class
because you decompiled the class file and found it.  Where was that class file
if not under your webapps WEB-INF/classes directory?  My guess is that you have
an older copy of your class in a jar file under WEB-INF/lib and you need to
rebuild your jar file.

Pete.


On Thu, 20 Jun 2002 09:20:47 +0100
David Dale <David@optimad.com> wrote:

> we had a look in the classes directory there is no class called
> com.optimad.ecap.MenuBuilder. There are other jar files but I do not think
> these contain the class. How do I work out where java is looking for these
> classes? Is there a way to step through and see what it is doing?
> 
> cheers,
> david
> 
> 
> ________________________________
> David Dale
> Creative
> 
> optimad media systems
> david@optimad.com
> http://www.optimad.com
> Office: +44 (0)20 7291 7567
> Mobile: +44 (0)78 7620 6434
> 
> 
> -----Original Message-----
> From: Peter Davison [mailto:peterdavison@rogers.com] 
> Sent: 20 June 2002 00:26
> To: Tomcat Users List
> Subject: Re: Method not found in class error
> 
> 
> Hi David.
> 
> Any chance you have the class "com.optimad.ecap.MenuBuilder" being loaded
> from a the wrong location (like from a jar file when you're expecting it to
> be loaded from the classes directory)?  Or maybe this class is in more than
> one jar file and that other jar is being loaded first?
> 
> P.
> 
> On Wed, 19 Jun 2002 20:32:05 +0100
> David Dale <David@optimad.com> wrote:
> 
> > Dear all,
> > 
> > We have a working web application that has been deployed to a new 
> > server. I am a bit new to all this and the guys here are deep into 
> > other development and are unable to help. One particular JSP fails to 
> > compile and complaining that a method is missing from a class. The 
> > method is in the source code, I can see this by decompiling the class 
> > file in question. I deleted everything in the working directory 
> > without success. The error message is below please help if you can, 
> > sorry if this is stupid question:
> > 
> > Error: 500
> > Location: /documents/menutree.jsp
> > Internal Servlet Error:
> > 
> > org.apache.jasper.JasperException: Unable to compile class for 
> > JSPF:\jakarta-tomcat-3.2.4\work\localhost_8080\_0002fdocuments_0002fme
> > nutree
> > _0002ejspmenutree_jsp_0.java:85: Method setCampaignID(java.lang.String)
> not
> > found in class com.optimad.ecap.MenuBuilder.
> >                  menuBuilder.setCampaignID(cID); 
> >                                           ^
> >
> F:\jakarta-tomcat-3.2.4\work\localhost_8080\_0002fdocuments_0002fmenutree_00
> > 02ejspmenutree_jsp_0.java:91: Method
> > getMainMenuString(com.optimad.user.datamodels.UserModel) not found in
> class
> > com.optimad.ecap.MenuBuilder.
> >                 out.print(menuBuilder.getMainMenuString(currentUser));
> >                                                        ^
> > 
> > cheers,
> > david
> > 
> > --
> > To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> > <mailto:tomcat-user-help@jakarta.apache.org>
> > 
> 
> 
> --
> Peter Davison
> peterdavison@rogers.com
> 
> Children begin by loving their parents.  After a time they judge them.
> Rarely, if ever, do they forgive them.
> 		-- Oscar Wilde
> 
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 


--
Peter Davison
peterdavison@rogers.com

	A ranger was walking through the forest and encountered a hunter
carrying a shotgun and a dead loon.  "What in the world do you think you're
doing?  Don't you know that the loon is on the endagered species list?"
	Instead of answering, the hunter showed the ranger his game bag,
which contained twelve more loons.
	"Why would you shoot loons?", the ranger asked.
	"Well, my family eats them and I sell the plumage."
	"What's so special about a loon?  What does it taste like?"
	"Oh, somewhere between an American Bald Eagle and a Trumpeter Swan."

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message