This may be a classloader issue similar to ones I've seen with Weblogic. I
don't remember having to do this with with JBoss, but the ideas may help.

To get this to work in an 'ear' file with weblogic, you need to additional
steps that aren't required with war files. They are:

 - in the Manifest.mf file you need to add a line that lists all the jar
files required by the application, such as:

    Class-Path: struts.jar jdom.jar jaxen-full.jar junit.jar saxpath.jar
cactus.jar aspectjrt.jar

 - Then you need to insert these jar files into the ear file at the same
level as the war file. I actually put them in BOTH the ear and war files -
not sure if this is really required. An ant task that accomplishes this
looks like:

            <!-- Add the third-party jar files to the ear file -->
            <jar  destfile  = "${app.ear}"
                  basedir   = "${lib.home}"
                  includes  = "struts.jar jdom.jar jaxen-full.jar junit.jar 
saxpath.jar"
                  update    = "yes" />

This task would be executed after you jave the ear file complete and ready
for deployment.







Richard Doust <[EMAIL PROTECTED]> on 11/04/2002 08:23:09 AM

Please respond to "Struts Users Mailing List"
       <[EMAIL PROTECTED]>

To:    [EMAIL PROTECTED]
cc:     (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:    ClassDefNotFound error on Action


I'm trying to incorporate Struts into an existing ear after having
successfully deployed Struts wars. On attempting to invoke an action url I
get:

2002-11-04 01:03:52,446 WARN  [org.jboss.jbossweb] WARNING: action: Error
creating Action instance for path '/getReview', class name
'com.nym.videostore.actions.GetReviewAction'
java.lang.NoClassDefFoundError: org/apache/struts/action/Action   at
java.lang.ClassLoader.defineClass0(Native Method)     at
java.lang.ClassLoader.defineClass(ClassLoader.java:502)     at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
java.net.URLClassLoader.defineClass(URLClassLoader.java:250)      at
java.net.URLClassLoader.access$100(URLClassLoader.java:54)  at
java.net.URLClassLoader$1.run(URLClassLoader.java:193)      at
java.security.AccessController.doPrivileged(Native Method)  at
java.net.URLClassLoader.findClass(URLClassLoader.java:186)  at
org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:22

6)    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 at
org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.

java:234)   at
org.jboss.mx.loading.UnifiedLoaderRepository2.loadClassFromRepository(Unifie

dLoaderRepository2.java:269)  at
org.jboss.mx.loading.UnifiedLoaderRepository2.loadClass(UnifiedLoaderReposit

ory2.java:149)    at
org.jboss.mx.loading.UnifiedClassLoader2.loadClass(UnifiedClassLoader2.java:

146)  at java.lang.ClassLoader.loadClass(ClassLoader.java:292)    at
java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:566)       at
java.lang.ClassLoader.loadClass(ClassLoader.java:255)       at
org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:216)  at
org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:200)  at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)     at
java.lang.Class.forName0(Native Method)   at
java.lang.Class.forName(Class.java:140)   at
org.apache.struts.action.ActionServlet.processActionCreate(ActionServlet.jav

a:1631)     at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1577)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)      at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)      at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)  at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl

er.java:284)      at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
at
org.mortbay.http.HttpContext.handle(HttpContext.java:1674)  at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext

.java:544)  at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
at org.mortbay.http.HttpServer.service(HttpServer.java:875)       at
org.jboss.jetty.Jetty.service(Jetty.java:541)   at
org.mortbay.http.HttpConnection.service(HttpConnection.java:785)  at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)     at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)   at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:200)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)      at
org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)    at
java.lang.Thread.run(Thread.java:536)


I am using Struts 1.0.2, JBoss 3.0.3 and the version of Jetty that's
included in that package. I haven't been able to figure this out.
struts.jar
is in the /WEB-INF/lib directory and the Action class is definitely there.
I've seen some posts about ActionForm not being found but couldn't find any
info that helps. Can anyone point me in a direction that might help me to
solve this?

Thanks very much
Richard Doust


--
To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@;jakarta.apache.org>







---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to