Hi,
I installed Cactus on Weblogic6.1. The installation seems
to be fine. But when I try to run the any of the sample
examples by typing- say, for eg.,TestServletTestCase1, I get
the following errors:
10:39:41,507 [Thread-1] DEBUG unit.TestServletTestCase1 -
Exception in test
java.io.StreamCorruptedException: InputStream does not contain
a serialized object
at java.io.ObjectInputStream.readStreamHeader
(ObjectInputStream.java:849)
at java.io.ObjectInputStream.<init>
(ObjectInputStream.java:168)
at org.apache.cactus.client.AbstractHttpClient.doTest
(AbstractHttpClient.java:148)
at org.apache.cactus.AbstractTestCase.runGenericTest
(AbstractTestCase.java:422)
at org.apache.cactus.ServletTestCase.runTest
(ServletTestCase.java:130)
at
org.apache.cactus.sample.unit.TestServletTestCase1_InterceptorSe
rvlet
TestCase.runTest
(TestServletTestCase1_InterceptorServletTestCase.java:91)
at org.apache.cactus.AbstractTestCase.runBare
(AbstractTestCase.java:371)
at junit.framework.TestResult$1.protect
(TestResult.java:106)
at junit.framework.TestResult.runProtected
(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.awtui.TestRunner$10.run(TestRunner.java:403)
The JUnit runs successfully but with the above errors.
The source code of TestServletTestCase1 is as follows:
package org.apache.cactus.sample.unit;
import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.net.*;
import java.io.*;
import junit.framework.*;
import org.apache.cactus.*;
public class TestServletTestCase1
extends TestServletTestCase1_InterceptorServletTestCase
{
public TestServletTestCase1(String theName)
{
super(theName);
}
public static void main(String[] theArgs)
{
junit.ui.TestRunner.main(new String[] {
TestServletTestCase1.class.getName()});
}
public static Test suite()
{
return new TestSuite(TestServletTestCase1.class);
}
public void testAssertionFailedError()
{
throw new AssertionFailedError("test assertion failed
error");
}
public void testExceptionNotSerializable()
throws TestServletTestCase1_ExceptionNotSerializable
{
throw new TestServletTestCase1_ExceptionNotSerializable(
"test non serializable exception");
}
public void testExceptionSerializable()
throws TestServletTestCase1_ExceptionSerializable
{
throw new TestServletTestCase1_ExceptionSerializable(
"test serializable exception");
}
}
What causes this error and how do I fix it?
Thanks and Regards,
Jayati
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag