Home > Archive > Java Help > September 2004 > Resin throwing NoSuchMethodError from Servlet Class
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Resin throwing NoSuchMethodError from Servlet Class
|
|
| Greg Scharlemann 2004-09-24, 8:57 pm |
| 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 2004-09-25, 4:00 am |
| 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 2004-09-25, 3:59 pm |
| 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).
"Tony Morris" <not@telling.you> wrote in message news:<QF35d.3265$5O5.2528@news-server.bigpond.net.au>...
> 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.
|
|
|
|
|