Hi Mark,

Are you sure you don't have another cactus jar somewhere in your system
classpath?

As for using the <cactus> task, here's what you need to have in your
classpath for the taskdef:

cactus-ant.jar
cactus.jar
commons-logging.jar
junit.jar
commons-httpclient.jar
aspectjrt.jar

and optionally:

httpunit.jar
nekohtml.jar (required by httpunit)
xerces.jar (required by httpunit)
xml-apis.jar (required by httpunit)
js.jar (required by httpunit)

Then you don't need to add any of those to the classpath for the
<cactus> task (they are automatically added by the <cactus> task). You
only need to add your own code + dependent libraries.

A sample build file is available at http://tinyurl.com/2fjj6 (that's the
one provided in the Cactus distribution in samples/servlet).

Thanks
-Vincent

> -----Original Message-----
> From: Mark Lybarger [mailto:[EMAIL PROTECTED]
> Sent: 19 May 2004 20:06
> To: Cactus Users List
> Subject: RE: Cactus + Weblogic 8.1
> 
> i've worked through my issues thus far, but now when running my tests,
> it's unable to find the ServletTestCase class.  i'm using a cactified
war
> inside an ear. here;s the exception:
> 
> org/apache/cactus/ServletTestCase
> 
> java.lang.NoClassDefFoundError: org/apache/cactus/ServletTestCase at
> java.lang.ClassLoader.defineClass0(Native Method) at
> java.lang.ClassLoader.defineClass(ClassLoader.java:502) at
>
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
>
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericCla
ss
> Loader.java:476) at
>
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoa
de
> r.java:181) at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at
> java.lang.ClassLoader.loadClass(ClassLoader.java:292) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:255) at
>
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoa
de
> r.java:223) at
>
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAware
Cl
> assLoader.java:41) at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at
> java.lang.Class.forName0(Native Method) at
> java.lang.Class.forName(Class.java:217) at
>
org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFromContextCla
ss
> Loader_aroundBody2(ClassLoaderUtils.java:78) at
>
org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFromContextCla
ss
> Loader_aroundBody3$advice(ClassLoaderUtils.java:164) at
>
org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFromContextCla
ss
> Loader(ClassLoaderUtils.java) at
>
org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aroundBody0(C
la
> ssLoaderUtils.java:61) at
>
org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aroundBody1$a
dv
> ice(ClassLoaderUtils.java:164) at
>
org.apache.cactus.internal.util.ClassLoaderUtils.loadClass(ClassLoaderUt
il
> s.java) at
>
org.apache.cactus.internal.server.AbstractWebTestCaller.getTestClassClas
s(
> AbstractWebTestCaller.java:485) at
>
org.apache.cactus.internal.server.AbstractWebTestCaller.getTestClassInst
an
> ce(AbstractWebTestCaller.java:384) at
>
org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractW
eb
> TestCaller.java:109) at
>
org.apache.cactus.internal.server.AbstractWebTestController.handleReques
t_
> aroundBody0(AbstractWebTestController.java:93) at
>
org.apache.cactus.internal.server.AbstractWebTestController.handleReques
t_
> aroundBody1$advice(AbstractWebTestController.java:124) at
>
org.apache.cactus.internal.server.AbstractWebTestController.handleReques
t(
> AbstractWebTestController.java) at
>
org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(Servle
tT
> estRedirector.java:101) at
>
org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice
(S
> ervletTestRedirector.java:124) at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirec
to
> r.java) at
>
org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(Servlet
Te
> stRedirector.java:72) at
>
org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(
Se
> rvletTestRedirector.java:124) at
>
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirect
or
> .java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rv
> letStubImpl.java:1053) at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
ja
> va:387) at
> weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at
>
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
27
> ) at
>
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un
> (WebAppServletContext.java:6316) at
>
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bj
> ect.java:317) at
>
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118
)
> at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
et
> Context.java:3622) at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
ja
> va:2569) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> 
> here's my task being used to run the cactus test:
> 
>   <path id="cactus.classpath">
>     <pathelement location="${weblogic.lib.dir}/weblogic.jar"/>
>     <pathelement location="${weblogic.lib.dir}/xmlx.jar"/>
>   </path>
> 
>   <target name="cactus.test" description="runs the cactus test">
>     <taskdef resource="cactus.tasks" classpathref="classpath" />
>               <cactus fork="yes"
earfile="${basedir.ejb.build}/isacejb.ear"
> printsummary="yes" failureproperty="tests.failed">
>                       <classpath>
>                               <path refid="cactus.classpath" />
>                 <pathelement
location="${basedir.build.web-inf.classes}"
> />
>                       </classpath>
>                       <containerset>
>                               <weblogic7x dir="/bea/weblogic81"
tmpdir="/temp"
>
configXml="/cbc/isac/ISAC/config.xml"
> port="8080"
>                                       output="testContainerOutput.log"
>                                       todir="test"/>
>                       </containerset>
>                       <formatter type="xml"/>
>                       <batchtest todir="test">
>                               <fileset
dir="${basedir.build.web-inf.classes}">
>                         <include name="**/ejb20/**/*Test*" />
>                         <exclude name="**/ui/*" />
>                         <exclude name="**/db/*" />
>                               </fileset>
>                       </batchtest>
>               </cactus>
> 
>   </target>
> 
> and a little snippet from the Test*.xml:
> 
> <property name="java.class.path"
>
value="C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\serve
r\
> lib\xmlx.jar;C:\build\isac\WEB-INF\classes;C:\ant\lib\junit-
>
3.8.1.jar;C:\ant\lib\ant-launcher.jar;C:\ant\lib\ant.jar;C:\ant\lib\ant-
> junit.jar;C:\Source\WEB-INF\lib\aspectjrt-1.1.1.jar;C:\Source\WEB-
> INF\lib\cactus-1.6.1.jar;C:\Source\WEB-INF\lib\cactus-ant-
> 1.6.1.jar;C:\Source\WEB-INF\lib\commons-logging-api.jar;C:\Source\WEB-
> INF\lib\commons-httpclient.jar"/>
> <property name="ant.version" value="Apache Ant version 1.6.1 compiled
on
> February 12 2004"/>
> <property name="buildProps" value="build.properties"/>
> 
> any one encounter this issue?
> 
> > -----Original Message-----
> > From: Mark Lybarger
> > Sent: Wednesday, May 19, 2004 9:37 AM
> > To: Cactus Users List
> > Subject: RE: Cactus + Weblogic 8.1
> >
> >
> > ok, i think i may see something here. it seems that cactus is
> > using passwords of weblogic/weblogic.  mine are different.  i
> > removed the 3des and put clear text passwords in my
> > config.xml, but it's still not starting up due to password
> > issues. perhaps the username (mine is user system) different
> > causes issues?  any insights?
> >
> > > -----Original Message-----
> > > From: Mark Lybarger
> > > Sent: Tuesday, May 18, 2004 1:35 PM
> > > To: Cactus Users List
> > > Subject: Cactus + Weblogic 8.1
> > >
> > >
> > > I'll keep the thread going.
> > >
> > > I'm looking to use the cactus task with the weblogic7x
> > > container set to facilitate testing (automate start/stop of
> > > container, etc).  i'm currently using the generic
> > > containerset to run my tests, and i assume the container is
> > > started, things deployed, etc.
> > >
> > > There was a mention earlier on this list (diff thread) about
> > > using configXml to give your config xml to use.  In trying
> > > that, i get errors with the encrypted passwords of my
> > > config.xml. specifically in the embedded ldap area.  I think
> > > i can set the passwords to clear text passwords, but i'm not
> > > sure what they are.  I know my domain user name and password
> > > that i log into the console with, but that doens't seem to
> > > work.  Any ideas here would be helpfull.
> > >
> > >
> > > thanks!
> > > ~mark
> > >
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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

Reply via email to