For reference, here's the stack trace
[junit] org/apache/cactus/ServletTestCase
[junit] java.lang.NoClassDefFoundError:
org/apache/cactus/ServletTestCase
[junit] at java.lang.ClassLoader.defineClass0(Native Method)
[junit] at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
[junit] at com.evermind._ck.findClass(.:273)
[junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
[junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
[junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
[junit] at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
[junit] at java.lang.Class.forName0(Native Method)
[junit] at java.lang.Class.forName(Class.java:120)
[junit] at
org.apache.cactus.server.AbstractTestCaller.getTestClassClass(AbstractTestCa
ller.java:331)
[junit] at
org.apache.cactus.server.AbstractTestCaller.getTestClassInstance(AbstractTes
tCaller.java:302)
I've now downloaded the source from CVS (vain hope that the bug has been
fixed) but to no avail. I've been playing around in AbstractTestCaller with
the class loaders but I can't seem to figure it out.
In summary:
- Loading a test such as org.apache.cactus.TestAll works fine
- Cactus fails to find org.apache.cactus.ServletTestCase when loading any
test in com.*
- org.apache.cactus.ServletTestCase is in cactus.jar which is seen by the
class loader
Frustrated. ;)
-mike
Mike Cannon-Brookes :: [EMAIL PROTECTED]
Atlassian :: http://www.atlassian.com
Supporting YOUR J2EE World
> -----Original Message-----
> From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 18, 2001 3:40 PM
> To: [EMAIL PROTECTED]
> Subject: RE: NoClassDefFoundError: WAS RE:
> java.io.StreamCorruptedException: InputStream does not contain a
> serialized object
>
>
> Ok, this definitely seems to be a problem with Cactus.
>
> Looking through every mail in the mailing list, it seems this problem has
> been reported on:
> Orion (me)
> Weblogic
> VAJ
> IPlanet
>
> (same stack trace is in all emails)
>
> Is there a solution? Or did all the people who reported the error give up
> and wander off? ;)
>
> -mike
>
>
> Mike Cannon-Brookes :: [EMAIL PROTECTED]
>
> Atlassian :: http://www.atlassian.com
> Supporting YOUR J2EE World
>
>
>
> > -----Original Message-----
> > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, October 18, 2001 3:25 PM
> > To: [EMAIL PROTECTED]
> > Subject: FW: NoClassDefFoundError: WAS RE:
> > java.io.StreamCorruptedException: InputStream does not contain a
> > serialized object
> >
> >
> > It gets odder! ;)
> >
> > I've now boiled it down to an error during compilation?
> >
> > I've now got an Ant buildfile that runs the
> > org.apache.cactus.TestAll - runs
> > fine.
> >
> > When I swap the class for com.atlassian.ejb.SimpleCactusTest - it gives
> > java.lang.NoClassDefFoundError: org/apache/cactus/ServletTestCase again!
> >
> > (This is when all classes are in the SAME deployed WAR, in the same
> > /WEB-INF/classes, using the SAME buildfile)
> >
> > Surely the error then is in some weird difference between the classes?
> >
> > Here's the source of my SimpleCactusTest:
> > package com.atlassian.ejb.test;
> >
> > import java.io.*;
> > import java.util.*;
> > import java.text.*;
> > import javax.servlet.*;
> > import javax.servlet.http.*;
> > import java.net.*;
> >
> > import junit.framework.*;
> >
> > import org.apache.cactus.*;
> > import org.apache.cactus.util.*;
> >
> > public class SimpleCactusTest extends ServletTestCase
> > {
> > public SimpleCactusTest(String s) {
> > super(s);
> > }
> >
> > public void testSomething() throws Exception {
> > ServletOutputStream os = response.getOutputStream();
> > os.print("<html><head><Long Process></head><body>");
> > os.flush();
> >
> > // do some processing that takes a while ...
> > Thread.sleep(3000);
> > os.println("Some data</body></html>");
> > }
> >
> > public static Test suite() {
> > return new TestSuite(SimpleCactusTest.class);
> > }
> > }
> >
> > (I copied testSomething() from testLongProcess() in the sample
> just to be
> > sure)
> >
> > Ideas? I'm out!
> >
> > Thanks,
> >
> >
> > -mike
> >
> >
> > -----Original Message-----
> > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, October 18, 2001 2:12 PM
> > To: [EMAIL PROTECTED]
> > Subject: NoClassDefFoundError: WAS RE: java.io.StreamCorruptedException:
> > InputStream does not contain a serialized object
> >
> >
> > Progress!
> >
> > I've now got the sample WAR to deploy on both a sample-launched
> > Orion and my
> > dev server - cheer!
> >
> > BUT:
> > When I run my own test WAR (my own test classes) I get a
> > NoClassDefFoundError: org/apache/cactus/ServletTestCase from
> Orion's class
> > loader.
> >
> > My WAR has junit.jar, cactus.jar, httpclient.jar and log4j.jar in the
> > /WEB-INF/lib directory (copied from the sample war).
> >
> > Ideas?
> >
> > -mike
> >
> >
> > Mike Cannon-Brookes :: [EMAIL PROTECTED]
> >
> > Atlassian :: http://www.atlassian.com
> > Supporting YOUR J2EE World
> >
> >
> >
> > > -----Original Message-----
> > > From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, October 18, 2001 1:35 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: java.io.StreamCorruptedException: InputStream does
> not contain
> > > a serialized object
> > >
> > >
> > > Ok, I'm about ready to kill this machine so I thought I'd
> turn here for
> > > help.
> > >
> > > I've spent all day trying to get Cactus set up.
> > >
> > > My setup is Orion 1.5.2/3 (neither seems to make a difference),
> > > Sun JDK 1.3
> > > on Linux.
> > >
> > > Whenever I try to use a WAR through my already setup Orion, I get this
> > > error.
> > >
> > > HOWEVER:
> > > I read the mailing list archives and someone else with the
> same problem
> > > solved it by fixing up his config. So I decided to run the
> > sample app - lo
> > > and behold it runs fine.
> > >
> > > BUT:
> > > When I then take the test.war from the sample app, drop it into
> > my server
> > > (same machine, same server, just run by me not test sample) -
> > it gives the
> > > exception again. Basically no matter what config / WAR I try, my
> > > dev server
> > > always spits back this error when running a test.
> > >
> > > Any ideas where else to look for problems? This is REALLY
> frustrating ;)
> > >
> > > -mike
> > >
> >
>