jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Lybarger" <Mark.Lybar...@CBC-Companies.com>
Subject RE: Cactus + Weblogic 8.1
Date Wed, 19 May 2004 20:06:57 GMT
I'm still chugging away...

> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Wednesday, May 19, 2004 3:29 PM
> To: 'Cactus Users List'
> Subject: RE: Cactus + Weblogic 8.1
> 
> 
> Hi Mark,
> 
> Are you sure you don't have another cactus jar somewhere in 
> your system
> classpath?

I'm fairly sure.

I'm getting the same error message when i use the browser integration to run tests on the
server that the cactus/weblogic7x brings up.  The browser shows:

Error 500--Internal Server Error

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(GenericClassLoader.java:476)
	at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.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(GenericClassLoader.java:223)
	at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.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.loadClassFromContextClassLoader_aroundBody2(ClassLoaderUtils.java:78)
	at org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFromContextClassLoader_aroundBody3$advice(ClassLoaderUtils.java:164)
	at org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFromContextClassLoader(ClassLoaderUtils.java)
	at org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aroundBody0(ClassLoaderUtils.java:61)
	at org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aroundBody1$advice(ClassLoaderUtils.java:164)
	at org.apache.cactus.internal.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java)
	at org.apache.cactus.internal.server.runner.WebappTestSuiteLoader.load_aroundBody0(WebappTestSuiteLoader.java:43)
	at org.apache.cactus.internal.server.runner.WebappTestSuiteLoader.load_aroundBody1$advice(WebappTestSuiteLoader.java:206)
	at org.apache.cactus.internal.server.runner.WebappTestSuiteLoader.load(WebappTestSuiteLoader.java)
	at junit.runner.BaseTestRunner.loadSuiteClass(BaseTestRunner.java:193)
	at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:86)
	at org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.java:305)
	at org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(ServletTestRunner.java:193)
	at org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advice(ServletTestRunner.java:124)
	at org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.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(ServletStubImpl.java:1053)
	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java: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.run(WebAppServletContext.java:6316)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
	at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
	at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

i do notice that my cactified war contains only a commons-logging-api.jar and not a commons-logging.jar.
 This doesn't seem to effect the cactified war when i start the weblogic server using the
startWebLogic.cmd script.  When I start the server using the startWebLogic.cmd script the
exact same cactified war will run tests ok.  

> 
> 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:Mark.Lybarger@CBC-Companies.com]
> > 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(Gener
> icClassLoa
> 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(Gener
> icClassLoa
> de
> > r.java:223) at
> >
> weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(C
> hangeAware
> 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.loadClassFrom
> ContextCla
> ss
> > Loader_aroundBody2(ClassLoaderUtils.java:78) at
> >
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFrom
> ContextCla
> ss
> > Loader_aroundBody3$advice(ClassLoaderUtils.java:164) at
> >
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFrom
> ContextCla
> ss
> > Loader(ClassLoaderUtils.java) at
> >
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aro
> undBody0(C
> la
> > ssLoaderUtils.java:61) at
> >
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aro
> undBody1$a
> dv
> > ice(ClassLoaderUtils.java:164) at
> >
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClass(Cla
> ssLoaderUt
> il
> > s.java) at
> >
> org.apache.cactus.internal.server.AbstractWebTestCaller.getTes
> tClassClas
> s(
> > AbstractWebTestCaller.java:485) at
> >
> org.apache.cactus.internal.server.AbstractWebTestCaller.getTes
> tClassInst
> 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.ha
> ndleReques
> t_
> > aroundBody0(AbstractWebTestController.java:93) at
> >
> org.apache.cactus.internal.server.AbstractWebTestController.ha
> ndleReques
> t_
> > aroundBody1$advice(AbstractWebTestController.java:124) at
> >
> org.apache.cactus.internal.server.AbstractWebTestController.ha
> ndleReques
> t(
> > AbstractWebTestController.java) at
> >
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBo
> dy2(Servle
> tT
> > estRedirector.java:101) at
> >
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBo
> dy3$advice
> (S
> > ervletTestRedirector.java:124) at
> >
> org.apache.cactus.server.ServletTestRedirector.doPost(ServletT
> estRedirec
> to
> > r.java) at
> >
> org.apache.cactus.server.ServletTestRedirector.doGet_aroundBod
> y0(Servlet
> Te
> > stRedirector.java:72) at
> >
> org.apache.cactus.server.ServletTestRedirector.doGet_aroundBod
> y1$advice(
> Se
> > rvletTestRedirector.java:124) at
> >
> org.apache.cactus.server.ServletTestRedirector.doGet(ServletTe
> stRedirect
> 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$ServletInvocationAct
> ion.run(Se
> rv
> > letStubImpl.java:1053) at
> >
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.
> ja
> > va:387) at
> > weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at
> >
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChain
> Impl.java:
> 27
> > ) at
> >
> weblogic.servlet.internal.WebAppServletContext$ServletInvocati
> onAction.r
> un
> > (WebAppServletContext.java:6316) at
> >
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSu
> bj
> > ect.java:317) at
> >
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118
> )
> > at
> >
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(W
> ebAppServl
> et
> > Context.java:3622) at
> >
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe
> questImpl.
> 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\weblog
> ic81\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:\an
> t\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: 
> 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
> 
> 
> 


Mime
View raw message