Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / September 2004

Tip: Looking for answers? Try searching our database.

Resin throwing NoSuchMethodError from Servlet Class

Thread view: 
Greg Scharlemann - 25 Sep 2004 01:27 GMT
I am attempting to set up a web application that contains a command in
the web.xml file to call a class named PhotoManagerController using
the <servlet> tags.  I use the <init-param> tags within the <servlet>
tags to pass parameters to the PhotoManagerController class that are
specific for the install. PhotoManagerController resides within a jar
file located here: {webhome}/WEB-INF/lib/

The problem occurs when PhotoManagerController calls upon another
class located within the same jar file.  Resin throws an exception
saying NoSuchMethodError.

How come that error is being thrown?  If the method didn't exist
wouldn't I get a compiler error?  I've unpacked the jar and confirmed
that the method being called exists...  Could it be something to do
with the PhotoManagerController file (I did notice that when I
commented out the failing method call, the method call just after it
threw the same NoSuchMethodError).

Anyone have any ideas?  Thanks, Greg
Tony Morris - 25 Sep 2004 02:16 GMT
Put the class in a package.
I'd drag out the relevant part of the spec. for you, but I'm sure you are
more than capable.

If problems persist, post a WAR with expected and actual outcome.

--
Tony Morris
http://xdweb.net/~dibblego
Greg Scharlemann - 25 Sep 2004 15:14 GMT
It is in a package.

com.photos.mt.controller.PhotoManagerController

attempts to call
com.photos.mt.resource.Resource.setup(String)
and
com.photos.logs.Logger.setup(String, String, String)

each time the NoSuchMethodError is thrown.  I've switched the calling
of these two methods and I just get the same NoSuchMethodError for
whichever method is called first.  (This lead me to believe and a
couple other things that I didn't have a stray jar file lying around
somewhere).

> Put the class in a package.
> I'd drag out the relevant part of the spec. for you, but I'm sure you are
> more than capable.
>
> If problems persist, post a WAR with expected and actual outcome.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.