> -----Original Message-----
> From: Karr, David [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 15, 2002 9:30 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Simple Struts "Hello World" application gets NPE in
> ProxyDirC onte xt.cacheLoad() when adding Validator
> 
> Now I'm really confused.  I changed the action names 
> slightly, but now it
> seems as if the app is failing to find the ValidatorForm 
> class (NCDFE),
> which is clearly in the "struts.jar" in WEB-INF/lib.  Is there some
> classloader problem here?  I don't think I was getting this 
> error before.
> 
> Here is a portion of the server console output:
> -----------------------
> Aug 15, 2002 9:17:10 AM org.apache.struts.util.RequestUtils 
> createActionForm
> SEVERE: Error creating form bean of class mainForm
> java.lang.NoClassDefFoundError: 
> org.apache.struts.validator.ValidatorForm
>         at java.lang.Class.getDeclaredConstructors0(Native Method)
>         at 
> java.lang.Class.privateGetDeclaredConstructors(Class.java:1576)
>         at java.lang.Class.getConstructor0(Class.java:1748)

I'm finding that this behaves differently every time I "shutdown" and
"startup" Tomcat.  I changed my Tomcat startup script to use
"-verbose:class" on "start", so I can see when or whether it tries to load
this class.

Every other time that I do a "startup" and run my test so that I get this
failure, if I scan through the server output, up to the last "Starting
service Tomcat-Standalone", I don't see a "Loaded" message for this class,
nor does it seem to load any of the classes from my application.

If I then use "shutdown.sh" and then "startup.sh" and then retest, it
doesn't get this symptom, but it still behaves oddly.  My opening page comes
up, and I can "submit" it, but it doesn't seem to go anywhere (my print
statements in the submitting action don't show up).  When I try to trace
through the "Loaded" messages in the current session, I find the entry for
"ValidatorForm", and near it, the entries for my application's classes.

I guess this is becoming a Tomcat problem, but it seems as if it's related
to Struts and Validator, or Struts PlugIns.

While I've been tracking this, I noticed the slight error in how this
exception error is reported, as it prints "mainForm" instead of the name of
my Form class.  I've since patched my copy of 1.1b2 with a fix to this
(along with the bug report) and verified that it is really my derived
ActionForm class that is being reported there, even though it's the base
class (ValidatorForm) that it can't load.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to