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 Monojit Choudhury <mo...@ltp.soft.net> on 2001/12/10 09:06:54 UTC

unable to run the testcases

hi,
 while running the testcases i got the following error.
can anyone explain to me about what has gone wrong?
i m attaching all the files related to it.

RUNNING THE TESTCASES
    [junit] Running TestAll
    [junit] ,.............................Inside TestAll.java
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162 sec
    [junit] Testsuite: TestAll
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162 sec
    [junit]
    [junit] Testcase: testConvert took 1.142 sec
    [junit]     Caused an ERROR
    [junit] InputStream does not contain a serialized object
    [junit] java.io.StreamCorruptedException: InputStream does not contain a seriali
zed object
    [junit]     at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    [junit]     at java.io.ObjectInputStream.<init>(Unknown Source)
    [junit]     at org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpCl
ient.java:148)
    [junit]     at org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCas
e.java:422)
    [junit]     at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:13
0)
    [junit]     at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:
371)
    [junit]     at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]     at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:131)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(
JUnitTestRunner.java:202)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main
(JUnitTestRunner.java:326)
    [junit]

BUILD FAILED




**************************************************
In theory there is no difference between
theroy and  practice but in practice there is 
**************************************************
Monojit Choudhury
Software Engineer
Lisle Technology Parteners (India) Pvt. Ltd.
45/3, Gopalkrishna Complex,
Residency Road,
Bangalore-560025.

Ph : +91080-5597622
e-Mail Id : monojit@ltp.soft.net


Re: unable to run the testcases

Posted by Monojit Choudhury <mo...@ltp.soft.net>.
thanks for ur response.
Actually at first i was putting the WEB-INF dir directly under the
defaultWebApp dir.
and in the cactus.properties file also there was no context,but still then i
had the same error.

----- Original Message -----
From: "Vincent Massol" <vm...@octo.com>
To: "'Cactus Users List'" <ca...@jakarta.apache.org>
Sent: Thursday, December 13, 2001 4:07 PM
Subject: RE: unable to run the testcases


> Monojit,
>
> This is not related to Cactus but linked to your understanding of
> WebLogic and the Servlet spec. What happens is the default web
> application of weblogic is mapped to the root context "/", i.e. the
> index.html page inside DefaultWebApp is accessed through:
> http://localhost:7001/index.html and NOT
> http://localhost:7001/DefaultWebApp/index.html.
>
> Thus the URL for the Servlet Redirector set up in cactus.properties is
> wrong. It should be :
>
> http://localhost:7001/ServletRedirector
>
> and you must NOT have a test directory if you put your code in the
> default web app (the WEB-INF directory is located at
> DefaultWebApp/WEB-INF
>
> If you wish to use your own context, then you should not put your code
> in the default web app !
>
> -Vincent
>
>
> > -----Original Message-----
> > From: Monojit Choudhury [mailto:monojit@ltp.soft.net]
> > Sent: 13 December 2001 10:09
> > To: Cactus Users List
> > Subject: Re: unable to run the testcases
> >
> > hi vincent
> > well now i m facing a different error.
> > what i get in the console is as follows
> >
> >     [junit]
> >
> http://localhost:7001/DefaultWebApp/test/ServletRedirector?Cactus_TestMe
> >
> thod=testConvert&Cactus_TestClass=ConverterTest&Cactus_AutomaticSession=
> tr
> > ue
> > &Cactus_
> > Service=CALL_TEST
> >     [junit] java.io.FileNotFoundException:
> > http://localhost:7001/DefaultWebApp/test/
> >
> ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass=Convert
> er
> > Te
> > st&Cactu
> > s_AutomaticSession=true&Cactus_Service=CALL_TEST
> >     [junit]     at
> > sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknow
> > n Source)
> >
> >
> > i am using weblogic 6.1 and the directory structure of the webapp
> folder
> > is
> >
> C:\weblogic\wlserver6.1\config\mydomain\applications\DefaultWebApp\test\
> WE
> > B-
> > INF
> >
> > can u help me out?
> >
> > regds
> > monojit
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:cactus-user-
> > help@jakarta.apache.org>
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


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


RE: unable to run the testcases

Posted by Vincent Massol <vm...@octo.com>.
Monojit,

This is not related to Cactus but linked to your understanding of
WebLogic and the Servlet spec. What happens is the default web
application of weblogic is mapped to the root context "/", i.e. the
index.html page inside DefaultWebApp is accessed through:
http://localhost:7001/index.html and NOT
http://localhost:7001/DefaultWebApp/index.html.

Thus the URL for the Servlet Redirector set up in cactus.properties is
wrong. It should be :

http://localhost:7001/ServletRedirector

and you must NOT have a test directory if you put your code in the
default web app (the WEB-INF directory is located at
DefaultWebApp/WEB-INF

If you wish to use your own context, then you should not put your code
in the default web app !

-Vincent


> -----Original Message-----
> From: Monojit Choudhury [mailto:monojit@ltp.soft.net]
> Sent: 13 December 2001 10:09
> To: Cactus Users List
> Subject: Re: unable to run the testcases
> 
> hi vincent
> well now i m facing a different error.
> what i get in the console is as follows
> 
>     [junit]
>
http://localhost:7001/DefaultWebApp/test/ServletRedirector?Cactus_TestMe
>
thod=testConvert&Cactus_TestClass=ConverterTest&Cactus_AutomaticSession=
tr
> ue
> &Cactus_
> Service=CALL_TEST
>     [junit] java.io.FileNotFoundException:
> http://localhost:7001/DefaultWebApp/test/
>
ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass=Convert
er
> Te
> st&Cactu
> s_AutomaticSession=true&Cactus_Service=CALL_TEST
>     [junit]     at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknow
> n Source)
> 
> 
> i am using weblogic 6.1 and the directory structure of the webapp
folder
> is
>
C:\weblogic\wlserver6.1\config\mydomain\applications\DefaultWebApp\test\
WE
> B-
> INF
> 
> can u help me out?
> 
> regds
> monojit
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




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


Re: unable to run the testcases

Posted by Monojit Choudhury <mo...@ltp.soft.net>.
hi vincent
well now i m facing a different error.
what i get in the console is as follows

    [junit]
http://localhost:7001/DefaultWebApp/test/ServletRedirector?Cactus_TestMe
thod=testConvert&Cactus_TestClass=ConverterTest&Cactus_AutomaticSession=true
&Cactus_
Service=CALL_TEST
    [junit] java.io.FileNotFoundException:
http://localhost:7001/DefaultWebApp/test/
ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass=ConverterTe
st&Cactu
s_AutomaticSession=true&Cactus_Service=CALL_TEST
    [junit]     at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknow
n Source)


i am using weblogic 6.1 and the directory structure of the webapp folder is
C:\weblogic\wlserver6.1\config\mydomain\applications\DefaultWebApp\test\WEB-
INF

can u help me out?

regds
monojit


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


RE: unable to run the testcases

Posted by Vincent Massol <vm...@octo.com>.
Monojit,
 
Please check http://jakarta.apache.org/cactus/faq.html#faq2 and tell us
if it solved your problem. From the zip you have provided it seems your
webapp context is "out" and not "test".
 
Thanks
-Vincent
 
-----Original Message-----
From: Monojit Choudhury [mailto:monojit@ltp.soft.net] 
Sent: 10 December 2001 08:07
To: cactus-user@jakarta.apache.org
Subject: unable to run the testcases
 
hi,
 while running the testcases i got the following error.
can anyone explain to me about what has gone wrong?
i m attaching all the files related to it.
RUNNING THE TESTCASES
    [junit] Running TestAll
    [junit] ,.............................Inside TestAll.java
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162
sec
    [junit] Testsuite: TestAll
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162
sec
    [junit]
    [junit] Testcase: testConvert took 1.142 sec
    [junit]     Caused an ERROR
    [junit] InputStream does not contain a serialized object
    [junit] java.io.StreamCorruptedException: InputStream does not
contain a seriali
zed object
    [junit]     at java.io.ObjectInputStream.readStreamHeader(Unknown
Source)
    [junit]     at java.io.ObjectInputStream.<init>(Unknown Source)
    [junit]     at
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpCl
ient.java:148)
    [junit]     at
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCas
e.java:422)
    [junit]     at
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:13
0)
    [junit]     at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:
371)
    [junit]     at
junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]     at
junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:131)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(
JUnitTestRunner.java:202)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main
(JUnitTestRunner.java:326)
    [junit]
 
BUILD FAILED
 
 
 
 
**************************************************
In theory there is no difference between
theroy and  practice but in practice there is 
**************************************************
Monojit Choudhury
Software Engineer
Lisle Technology Parteners (India) Pvt. Ltd.
45/3, Gopalkrishna Complex,
Residency Road,
Bangalore-560025.
 
Ph : +91080-5597622
e-Mail Id : monojit@ltp.soft.net

Re: unable to run the testcases

Posted by Monojit Choudhury <mo...@ltp.soft.net>.
hi vincent
 thanks a lot.I think the bug was that, i wasnt mentioning the webapp dir in
the cactus.properties file and also coz there was a version difference in
j2ee of the client side and the server side.

*******************************************************************
A conclusion is the place where you get tired of thinking
*******************************************************************
Monojit Choudhury
Software Engineer
Lisle Technology Parteners (India) Pvt. Ltd.
45/3, Gopalkrishna Complex,
Residency Road,
Bangalore-560025.

Ph : +91080-5597622
e-Mail Id : monojit@ltp.soft.net

----- Original Message -----
From: "Vincent Massol" <vm...@octo.com>
To: "'Cactus Users List'" <ca...@jakarta.apache.org>
Sent: Thursday, December 13, 2001 4:09 AM
Subject: RE: unable to run the testcases


> Monojit,
>
> Please check http://jakarta.apache.org/cactus/faq.html#faq2 and tell us
> if it solved your problem.
>
> Thanks
> -Vincent
>
> -----Original Message-----
> From: Monojit Choudhury [mailto:monojit@ltp.soft.net]
> Sent: 10 December 2001 08:07
> To: cactus-user@jakarta.apache.org
> Subject: unable to run the testcases
>
> hi,
>  while running the testcases i got the following error.
> can anyone explain to me about what has gone wrong?
> i m attaching all the files related to it.
> RUNNING THE TESTCASES
>     [junit] Running TestAll
>     [junit] ,.............................Inside TestAll.java
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162
> sec
>     [junit] Testsuite: TestAll
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162
> sec
>     [junit]
>     [junit] Testcase: testConvert took 1.142 sec
>     [junit]     Caused an ERROR
>     [junit] InputStream does not contain a serialized object
>     [junit] java.io.StreamCorruptedException: InputStream does not
> contain a seriali
> zed object
>     [junit]     at java.io.ObjectInputStream.readStreamHeader(Unknown
> Source)
>     [junit]     at java.io.ObjectInputStream.<init>(Unknown Source)
>     [junit]     at
> org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpCl
> ient.java:148)
>     [junit]     at
> org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCas
> e.java:422)
>     [junit]     at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:13
> 0)
>     [junit]     at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:
> 371)
>     [junit]     at
> junit.framework.TestResult$1.protect(TestResult.java:106)
>     [junit]     at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>     [junit]     at junit.framework.TestResult.run(TestResult.java:109)
>     [junit]     at junit.framework.TestCase.run(TestCase.java:131)
>     [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
>     [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
>     [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
>     [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(
> JUnitTestRunner.java:202)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main
> (JUnitTestRunner.java:326)
>     [junit]
>
> BUILD FAILED
>
>
>
>
> **************************************************
> In theory there is no difference between
> theroy and  practice but in practice there is
> **************************************************
> Monojit Choudhury
> Software Engineer
> Lisle Technology Parteners (India) Pvt. Ltd.
> 45/3, Gopalkrishna Complex,
> Residency Road,
> Bangalore-560025.
>
> Ph : +91080-5597622
> e-Mail Id : monojit@ltp.soft.net
>


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


RE: unable to run the testcases

Posted by Vincent Massol <vm...@octo.com>.
Monojit,
 
Please check http://jakarta.apache.org/cactus/faq.html#faq2 and tell us
if it solved your problem.
 
Thanks
-Vincent
 
-----Original Message-----
From: Monojit Choudhury [mailto:monojit@ltp.soft.net] 
Sent: 10 December 2001 08:07
To: cactus-user@jakarta.apache.org
Subject: unable to run the testcases
 
hi,
 while running the testcases i got the following error.
can anyone explain to me about what has gone wrong?
i m attaching all the files related to it.
RUNNING THE TESTCASES
    [junit] Running TestAll
    [junit] ,.............................Inside TestAll.java
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162
sec
    [junit] Testsuite: TestAll
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.162
sec
    [junit]
    [junit] Testcase: testConvert took 1.142 sec
    [junit]     Caused an ERROR
    [junit] InputStream does not contain a serialized object
    [junit] java.io.StreamCorruptedException: InputStream does not
contain a seriali
zed object
    [junit]     at java.io.ObjectInputStream.readStreamHeader(Unknown
Source)
    [junit]     at java.io.ObjectInputStream.<init>(Unknown Source)
    [junit]     at
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpCl
ient.java:148)
    [junit]     at
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCas
e.java:422)
    [junit]     at
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:13
0)
    [junit]     at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:
371)
    [junit]     at
junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]     at
junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:131)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(
JUnitTestRunner.java:202)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main
(JUnitTestRunner.java:326)
    [junit]
 
BUILD FAILED
 
 
 
 
**************************************************
In theory there is no difference between
theroy and  practice but in practice there is 
**************************************************
Monojit Choudhury
Software Engineer
Lisle Technology Parteners (India) Pvt. Ltd.
45/3, Gopalkrishna Complex,
Residency Road,
Bangalore-560025.
 
Ph : +91080-5597622
e-Mail Id : monojit@ltp.soft.net