> -----Original Message-----
> From: Per Olesen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 16, 2003 3:22 AM
> To: Cactus Users List
> Subject: RE: Cactus and weblogic
>
>
> Hi Mark,
>
> Mark Lybarger said:
> >
> > can you post your specific NoClassDefFoundError that you see in your
> > weblogic logs? And perhaps a sample of how you're running
> your tests?
>
> Certainly. This is the exception we saw. It happened when wls were
> deploying the webapp, which was cactified. It seems to be
> when it deploys
> the filter.
>
>
> java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> at
> org.apache.cactus.server.FilterTestRedirector.<clinit>(FilterT
estRedirector.java;org/apache/cactus/util/log/Log> Aspect.aj[1k]:87)
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:237)
> at
> weblogic.servlet.internal.WebAppServletContext.registerFilter(
> WebAppServletContext.java:1943)
> ....
>
I haven't used the FilterTestRedirector that I'm aware of, but I've seen
NoClassDefFoundError's in the wl logs when trying to deploy an ear which
contained an ejb and some helper jars. wls couldn't find the helper jars
due to issues with the manifest file in the ejb. the specific error message
was very misleading.
>
> The filter depends upon commons-logging, which we also had in
> WEB-INF/lib
> of the webapp.
>
> BTW: Inside commons-logging.jar, there is a manifest with a Class-Path
> ref, which refs a log4j.jar and log4j-core.jar. The log4j-core.jar we
> could not find, but we also tried adding log4j.jar to
> WEB-INF/lib to no
> avail.
>
> We are aware, that wls uses a three-level classloader
> hierarchy, with the
> system classloader at top, the ejb-classloader in the middle and the
> webapp classloader in the bottom. So we though it might be
> because we had
> some classes in the system or ejb classloader, which would confuse it
> about where to find the classes it needs !?
My impression is that the ejb classloader is separate from the webapp
classloader, and not a parent of.
>
> Actually, we tried adding the commons-logging jar to system
> classloader,
> which made it find it ok. Then it was just another class
> which it could
> not find :-( But we will not add all classes to the system
> classloader.
Agreed. There's got to be a better way than changing the system classpath
to make an application portable. You've got to go around changing your
startWeblogic scripts in every environment, yuck!
>
> Does this help in diagnosing the problems?
kinda sorta.. er, not so much. I'd suggest starting with the bare minimum
to build start an environment. try to deploy an empty war, with a very
basic test class, using a HelloWorld type ejb or servlet.
<target name="test.ejb.emptywar" depends="init" description="create empty
war">
<cactifywar mergewebxml="ServletTestRunnerIntegration.xml" version="2.3"
destfile="empty.war">
<classes dir="${basedir.build.projectName.web-inf.classes}"
includes="**/*Test.class" />
</cactifywar>
</target>
this produces a empty.war which has 4 libs.
WEB-INF/lib/aspectjrt.jar
WEB-INF/lib/cactus.jar
WEB-INF/lib/commons-logging.jar
WEB-INF/lib/commons-httpclient.jar
WEB-INF/lib/junit.jar
for me, this deploys ok to a mydomain type environment.
>
> Actually, we are looking into upgrading wls at some point in
> the future.
> Found out the wls6.1 does not support ejb-local-ref element
> in web.xml,
> even though it is part of J2EE1.3 spec. So we are unable to
> test EJBLocal
> beans from cactus in wls6.1. This makes me sad ;-(
>
>
> Regards, Per
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]