You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jordan Reed <jo...@hotmail.com> on 2002/08/22 23:52:37 UTC

Problem with subclassed Form Bean

I'm attempting to migrate my struts 1.0.1 application to Struts 1.1 and 
running into an annoying little problem that has got me stuck for too many 
hours.

Environment: WinXP, Java 1.4, Tomcat 4.0.3, jBoss 3.0.0

I deleted my entire /public_html directory and replaced it with Struts 
example application. The example application worked great.

So next I threw my application jar into the WEB-INF/lib directory, added my 
login.jsp and updated the struts-config.xml with my action and form bean 
entires:

When I redeploy the war, the action servlet fails to initialize. The stack 
has these exceptions:
2002-08-22 14:24:42,948 ERROR [STDERR] Aug 22, 2002 2:24:42 PM 
org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.NoClassDefFoundError: 
org/apache/struts/action/ActionForm

2002-08-22 14:24:43,258 ERROR [STDERR] Aug 22, 2002 2:24:43 PM 
org.apache.struts.action.ActionServlet initApplicationConfig
SEVERE: Parsing error processing resource path /WEB-INF/struts-config.xml
java.lang.reflect.InvocationTargetException

Okay, a NoClassDefFoundError seems pretty straight forward. My LoginForm 
object extends from ActionForm.  But struts.jar is in my WEB-INF/lib 
directory.  So ActionForm should be working.  Heck, if the ActionServlet is 
being initialized, the Web App can obviously find the struts.jar file.

To prove it to myself I threw JWhich into my WEB-INF/classes directory and 
added a call in my JSP:
<%JWhich.main(new String[] {"org.apache.struts.action.ActionForm"});%>

With the following results:
Class 'org.apache.struts.action.ActionForm' found in 
'file:C:/javadev/jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/contactmanager/WEB-INF/lib/struts.jar!/org/apache/struts/action/ActionForm.class'

Since my JSP page can see/classload this guy, the ActionServlet shouldn't 
have any problem doing it.
Anyone out there have some wisdom of what could be causing my problem?
-Jordan

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>