I've had many problems with this as well and so have many other people on
the list yet there has never been an explanation/reasoning posted in reply
(that I can find anyway).

I have resorted to adding certain jars to the main Tomcat classpath (I
launch as an NT service so I add the jars to the wrapper.properties
classpath) and this resolves any NoClassDefFoundError problems.  I leave the
jars in the WEB-INF/lib directory so they are logically in the correct
place, however I think this is a bug as I cannot see having to modify the
main classpath after deploying a webapp the required behaviour.

Any other comments/solutions please..

Richard.

-----Original Message-----
From: Peter M. Murray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 4:02 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Ye olde NoClassDefFoundError (new twist)



Greetings list.

First of all - JBoss ROCKS!

I'm having a spot of trouble with an app that uses Jakarta Struts.  Is there
someone who might be able to point me in the right direction?

Configuration:
jboss-tomcat-2.2
RedHat (well, VALinux) 6.2
Sun's jdk1.3.0_02
Jakarta Struts v1.0 - b1

My app has the struts.jar in its WEB-INF/lib directory and has a custom
LoginForm subclass of ActionForm.  My index.jsp uses the LoginForm.  The jsp
compiles fine, but at runtime (in the middle of rendering the page), I get
this exception:

java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at javax.management.loading.MLet.findClass(MLet.java:775)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava:446)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:120)
 at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:524)
 at
_0002findex_0002ejspindex_jsp_4._jspService(_0002findex_0002ejspindex_jsp_4.
java:110)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)


To my mind, it appears that the FormTag is trying to load my custom subclass
of ActionForm, thus triggering the loading of the ActionForm class - which,
for some reason, is failing.

Does anyone have any pointers?  I thought all jars in the WEB-INF/lib
directory would be available at runtime...

Cheers,

pete
peter m. murray
[EMAIL PROTECTED]



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**********************************************************************

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to