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 "Brown, Shannon" <SB...@knightridder.com> on 2002/11/21 01:00:12 UTC

Problems with Weblogic config.

Hi,

	I've read all the doc on the Cactus site regarding configuring the
client and server classpaths, and I still can't get my test up and running.
Here's the situation:

	I've got a pre-existing J2EE app running on Weblogic 6.1, sp2, and
I'm trying to write a test extending ServletTestCase.  I'm trying to use the
JUnit task in Ant to run tests on the server.  I've got targets that start
up and stop WebLogic just fine, but I just can't seem to get the server
classpath (I think) correct.  I keep getting the stack trace below in the
log file (see way below).  For some reason, the ServletTestCase class file
can't be found.

	I've got all the necessary JUnit- and Cactus-related jar files in
the WEB-INF/lib directory of the deployed webapp, including
cactus-1.4.1.jar, which contains the org/apache/cactus/ServletTestCase class
that I keep getting complaints about.  I've got all the other necessary
classpath elements, such as the cactus.properties file and the
log4j.properties file (since I'm using log4j).

	Now, two things of note:
	1) Previously, all the class files for this project were jarred and
placed into the WEB-INF/lib directory along with other third party jars
(like the cactus jars).  The application works just fine like that, but I
thought that it might be causing a problem for Cactus, so I unjarred all the
class files and put them under the WEB-INF/classes directory, where the
Cactus documentation says that server-side class files belong.  Both my Test
files and files to test are now under the WEB-INF/classes directory.
	2) The classpath for the JUnit task in ant includes all the Cactus
and JUnit jar files.  It points to the "development" version of these files,
meaning that they are separate from the ones deployed in the WEB-INF/lib
directory.  Actually, these are the ones that get copied over to the
WEB-INF/lib directory during the build, so I know that the same files should
be used on both the client and server sides.

	Does anyone have any insights here?  Is the error a server side
error, as I suspect, or is it a client-side problem?  I'm really mystified
as to why either one of the two would not be able to find the
ServletTestCase class.  Thanks.

Shannon Brown

    <error message="org/apache/cactus/ServletTestCase"
type="org.apache.cactus.client.ServletExceptionWrapper"><![CDATA[java.lang.N
oClassDefFoundError: org/apache/cactus/ServletTestCase
	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 java.lang.ClassLoader.loadClass(ClassLoader.java:297)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
	at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClas
sLoader.java:43)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:195)
	at
org.apache.cactus.util.ClassLoaderUtils.dispatch130_loadClassFromWebappClass
Loader(ClassLoaderUtils.java;org/apache/cactus/util/log/LogAspect.aj(1k):132
)
	at
org.apache.cactus.util.ClassLoaderUtils.around130_loadClassFromWebappClassLo
ader(ClassLoaderUtils.java;org/apache/cactus/util/log/LogAspect.aj(1k):1177)
	at
org.apache.cactus.util.ClassLoaderUtils.loadClassFromWebappClassLoader(Class
LoaderUtils.java;org/apache/cactus/util/log/LogAspect.aj(1k):129)
	at
org.apache.cactus.util.ClassLoaderUtils.dispatch128_loadClass(ClassLoaderUti
ls.java;org/apache/cactus/util/log/LogAspect.aj(1k):93)
	at
org.apache.cactus.util.ClassLoaderUtils.around128_loadClass(ClassLoaderUtils
.java;org/apache/cactus/util/log/LogAspect.aj(1k):1177)
	at
org.apache.cactus.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java;org/
apache/cactus/util/log/LogAspect.aj(1k):85)
	at
org.apache.cactus.server.AbstractWebTestCaller.getTestClassClass(AbstractWeb
TestCaller.java:332)
	at
org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(Abstract
WebTestCaller.java:301)
	at
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.
java:143)
	at
org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(
AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):1
25)
	at
org.apache.cactus.server.AbstractWebTestController.around87_handleRequest(Ab
stractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):114
9)
	at
org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWeb
TestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):101)
	at
org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(ServletTes
tRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):123)
	at
org.apache.cactus.server.ServletTestRedirector.around113_doPost(ServletTestR
edirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149)
	at
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.
java;org/apache/cactus/util/log/LogAspect.aj(1k):109)
	at
org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet(ServletTest
Redirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):96)
	at
org.apache.cactus.server.ServletTestRedirector.around112_doGet(ServletTestRe
director.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149)
	at
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.j
ava;org/apache/cactus/util/log/LogAspect.aj(1k):92)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
	at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456)
	at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1985)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
]]></error>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>