You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by "Korver, Aaron" <Aa...@Fiserv.com> on 2004/11/17 18:47:01 UTC

RE: Error running CactusStrutsTest case with an ExtendedActionSer vlet instead of ActionServlet

That would probably be it.  This depends on your application server, but
usually the Web container can "see" up into the EJB container, the opposite
is not true.  

To determine which classLoader module is used there is a setting on the app
server that is called (at least in Websphere) Classloader mode.  The choices
you have are PARENT_FIRST or PARENT_LAST.  PARENT_FIRST will use the
classloader from the EJB container as the first place to look, and then look
at the Web container.  PARENT_LAST is just the opposite.  

So, if you have A.jar in the EJB container's classpath, and A.jar needs
B.jar, but B.jar isn't in the EJB container's classpath it won't find it,
even if it is in the Web container.  Remember that Web can see up, but EJB
can't see down.  

If you change the classLoader setting to PARENT_LAST, then it will start
looking in the Web container and find A.jar and B.jar so things will then be
all happy.

> -----Original Message-----
> From: Mick.Knutson@wellsfargo.com [mailto:Mick.Knutson@wellsfargo.com]
> Sent: Wednesday, November 17, 2004 11:39 AM
> To: cactus-user@jakarta.apache.org
> Subject: RE: Error running CactusStrutsTest case with an
> ExtendedActionServlet instead of ActionServlet
> 
> 
> I looked at my ear, and there is cactus.jar in there, as well 
> as my in my war. Could that be it?
> 
> --------------------
> Mick Knutson
> Wells Fargo Business Direct
> (415) 222-1020
> 
> "This message may contain confidential and/or privileged 
> information. If you are not the addressee or authorized to 
> receive this for the addressee, you must not use, copy, 
> disclose, or take any action based on this message or any 
> information herein. If you have received this message in 
> error, please advise the sender immediately by reply e-mail 
> and delete this message. Thank you for your cooperation."
> --------------------
> 
> 
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Wednesday, November 17, 2004 8:32 AM
> To: 'Cactus Users List'
> Subject: RE: Error running CactusStrutsTest case with an
> ExtendedActionServlet instead of ActionServlet
> 
> 
> ... then the issue is that you must have some of the cactus 
> related jars in
> the system classloader/container CL instead of in your WEB-INF/lib
> directory.
> 
> If you put some of the jars in the system classloader what 
> can happen is
> that your test will call some class found in the system 
> classloader. This
> class will try to load the struts jar but it won't find it as 
> it is not in
> the system classloader (it's only in the Webapp classloader). 
> Not sure I was
> clear but basically to avoid any problem put all your jars in 
> WEB-INF/lib
> and ensure there's no leftover in the classpath used to start your
> container.
> 
> -Vincent
> 
> 
> > -----Original Message-----
> > From: Mick.Knutson@wellsfargo.com 
> [mailto:Mick.Knutson@wellsfargo.com]
> > Sent: mercredi 17 novembre 2004 17:16
> > To: cactus-user@jakarta.apache.org
> > Subject: RE: Error running CactusStrutsTest case with an
> > ExtendedActionServlet instead of ActionServlet
> > 
> > But it is there, as the ear still allows me to run my 
> application, but not
> > the tests.
> > 
> > --------------------
> > Mick Knutson
> > Wells Fargo Business Direct
> > (415) 222-1020
> > 
> > "This message may contain confidential and/or privileged 
> information. If
> > you are not the addressee or authorized to receive this for 
> the addressee,
> > you must not use, copy, disclose, or take any action based 
> on this message
> > or any information herein. If you have received this 
> message in error,
> > please advise the sender immediately by reply e-mail and delete this
> > message. Thank you for your cooperation."
> > --------------------
> > 
> > 
> > 
> > -----Original Message-----
> > From: Vincent Massol [mailto:vmassol@pivolis.com]
> > Sent: Tuesday, November 16, 2004 11:46 PM
> > To: 'Cactus Users List'
> > Subject: RE: Error running CactusStrutsTest case with an
> > ExtendedActionServlet instead of ActionServlet
> > 
> > 
> > Hi Mick,
> > 
> > The stack strace seems to imply that you do not have the 
> struts jar in
> > your
> > server-side classpath (in your WEB-INF/lib).
> > 
> > -Vincent
> > 
> > > -----Original Message-----
> > > From: Mick.Knutson@wellsfargo.com 
[mailto:Mick.Knutson@wellsfargo.com]
> > Sent: mercredi 17 novembre 2004 02:41
> > To: cactus-user@jakarta.apache.org
> > Cc: user@struts.apache.org
> > Subject: Error running CactusStrutsTest case with an
> ExtendedActionServlet
> > instead of ActionServlet
> >
> > Any help with this please...
> >
> > We extended our actionServlet with ExtendedActionServlet and when I
> tried
> > to run my test from a browser in this fashion:
> > http://localhost:8080/ServletTestRunner?xsl=cactus-
> > report.xsl&suite=com.wf.bd.ice.creditapplication.CreditapplicationSuite
> >
> > I got this error:
> > --------------------------
> >
> >
> > javax.servlet.ServletException: Failed to load test suite
> > [com.wf.bd.ice.creditapplication.CreditapplicationSuite], Reason is
> > [Failed to invoke suite():java.lang.NoClassDefFoundError:
> > org/apache/struts/action/ActionServlet]
> > 	at
> >
> org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.ja
> > va:309)
> 
> [snip]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org