tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "list" <l...@bednarz.ch>
Subject Re: ClassNotFound Exception with Struts Action
Date Wed, 03 Sep 2003 02:07:18 GMT
Hi Adam,

Well the problem was basically a lot more trivial. I use JBuilder Enterprise
to build my apps. It has a facility called 'Refactoring'. You can rename
classes, packages etc. and it should rename all references of the object you
rename. It does all the Java things but NOT the XML stuff. So I renamed my
action class but the action mapping in the XML file containing the struts
configuration was not changed! Thats why the class could not be found.

Since I could still not figure out, how to configure JBuilder to write a log
file when tomcat runs in its debugger, I just saw it, when running a
deployed version.

Tom


----- Original Message ----- 
From: "Adam Hardy" <ahardy.struts@cyberspaceroad.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Monday, September 01, 2003 10:45 AM
Subject: Re: ClassNotFound Exception with Struts Action


> hi Tom,
> it's not obvious what your problem could be.
>
> To find out the classpath being used by your app server, you should put
> an echo in your app server's batch file at the appropriate point, i.e.
> just before it calls javac.
>
> However app servers generally don't include the webapp directories in
> the classpath that java uses. It should all be internal.
>
> A frequent error is the spelling. It's case-sensitive.
>
> Adam
>
> On 08/31/2003 09:37 PM list wrote:
> > Hello,
> >
> > I have a strange problem which I currently cannot resolve. Maybe somone
can
> > help:
> >
> > I have written a Web Application that uses the struts action servlet. It
has
> > one simple action. As soon as I call it from a form I get a
ClassNotFound
> > Exception. Fact is that the class is in the WEB-INF\classes directory
with
> > the complete package path. It looks like it would not have that
classpath
> > set?
> >
> > The following is the extraction from the log file:
> >
> > 2003-08-31 20:04:23 StandardManager[]: Seeding random number generator
class
> > java.security.SecureRandom
> > 2003-08-31 20:04:23 StandardManager[]: Seeding of random number
generator
> > has been completed
> > 2003-08-31 20:04:24 StandardWrapper[:default]: Loading container servlet
> > default
> > 2003-08-31 20:04:24 StandardWrapper[:invoker]: Loading container servlet
> > invoker
> > 2003-08-31 20:04:24 action: Initializing configuration from resource
path
> > /WEB-INF/struts-config.xml
> > 2003-08-31 20:04:25 action: Process servletName=action, urlPattern=*.do
> > 2003-08-31 20:04:25 action: Process servletName=dboperations,
> > urlPattern=/dboperations
> > 2003-08-31 20:04:25 action: Process servletName=echnatonwebinit,
> > urlPattern=/echnatonwebinit
> > 2003-08-31 20:04:25 action: Mapping for servlet 'action' = '*.do'
> > 2003-08-31 20:30:58 action: Processing a GET for
/storeAndFireContactInfo
> > 2003-08-31 20:30:58 action: Setting locale 'en_US'
> > 2003-08-31 20:30:58 action:  Looking for Action instance for class
> > ch.smartsol.EchnatonWeb.StoreAndFireContactInfo
> > 2003-08-31 20:30:58 action:   Double checking for Action instance
already
> > there
> > 2003-08-31 20:30:58 action:   Creating new Action instance
> > 2003-08-31 20:30:58 action: Error creating Action instance for path
> > '/storeAndFireContactInfo', class name
> > 'ch.smartsol.EchnatonWeb.StoreAndFireContactInfo'
> > java.lang.ClassNotFoundException:
> > ch.smartsol.EchnatonWeb.StoreAndFireContactInfo
> >  at
> >
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> > a:1444)
> >  at
> >
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> > a:1289)
> >  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> >
> >
> > Is there any way to dump class path variables or to find out what could
> > cause the problem??
> >
> > Any help is greatly appreciated!
> >
> > Tom
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
> -- 
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


Mime
View raw message