Hi,

This looks like an error either in your code or in StrutsTestCase. It
appears someone is closing the HTTP connection (on the server side)
before the test is finished.

I have not yet used StrutsTestCase thus I cannot help you more. Maybe
you can search this mailing list archives; I seem to recall others
having this issue with StrutsTestCase (but I am not completely sure...).

Cheers,
-Vincent

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 04 October 2002 07:47
> To: [EMAIL PROTECTED]
> Subject: SocketException...
> Importance: High
> 
> Hi,
> 
> I am getting the following exception while trying a cactus testing
using
> StrutsTestCase.
> The client_log file details are given below. There is no server_log
> details as the call
> has not reached the server at all.
> 
> i am running both the client and the server from the same machine.
> 
> i have included junit.jar  in the classpath also.
> 
> i am using cactus 1.3, StrutsTestCase v1.9.
> 
> Could anyone throw some light on the above problem.........
> -----------------------------------------------------------
> 11:22:46,899 [main] DEBUG util.JUnitVersionHelper         -
> >getTestCaseName
>
([testFailedLogin(com.stanchart.sci.customer.tests.TestCactusLoginAction
)]
> )
> 11:22:46,909 [main] DEBUG util.JUnitVersionHelper         -
> <getTestCaseName
> = [testFailedLogin]
> 11:22:46,909 [main] DEBUG util.JUnitVersionHelper         -
> >getTestCaseName
>
([testSuccessfulLogin(com.stanchart.sci.customer.tests.TestCactusLoginAc
ti
> on)])
> 11:22:46,909 [main] DEBUG util.JUnitVersionHelper         -
> <getTestCaseName
> = [testSuccessfulLogin]
> 11:22:47,000 [main] DEBUG tests.TestCactusLoginAction     -
-------------
> Test:
> testFailedLogin
> 11:22:47,040 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_TestClass],
> [com.stanchart.sci.customer.tests.TestCactusLoginAction], [GET])
> 11:22:47,040 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,040 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_TestMethod], [testFailedLogin], [GET])
> 11:22:47,040 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,040 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_AutomaticSession], [true], [GET])
> 11:22:47,040 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,050 [main] DEBUG client.ServletHttpClient        -
> >doTest([simulation URL
> = [null], automatic session = [true], cookies = [], headers = [], GET
> parameters =
> [[[Cactus_TestMethod] = [[testFailedLogin]]][[Cactus_TestClass] =
>
[[com.stanchart.sci.customer.tests.TestCactusLoginAction]]][[Cactus_Auto
ma
> ticSession] =
> [[true]]]], POST parameters = []])
> 11:22:47,060 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_Service], [CALL_TEST], [GET])
> 11:22:47,060 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,080 [main] DEBUG client.HttpClientHelper         -
> >connect([simulation URL
> = [null], automatic session = [true], cookies = [], headers = [], GET
> parameters =
> [[[Cactus_TestMethod] = [[testFailedLogin]]][[Cactus_TestClass] =
>
[[com.stanchart.sci.customer.tests.TestCactusLoginAction]]][[Cactus_Auto
ma
> ticSession] =
> [[true]]][[Cactus_Service] = [[CALL_TEST]]]], POST parameters = []])
> 11:22:47,090 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_TestMethod])
> 11:22:47,090 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@c2b69622]
> 11:22:47,090 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_TestClass])
> 11:22:47,090 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@c27a9622]
> 11:22:47,090 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_AutomaticSession])
> 11:22:47,090 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@c06a9622]
> 11:22:47,090 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_Service])
> 11:22:47,100 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@c0169622]
> 11:22:47,540 [main] DEBUG client.HttpClientHelper         -
ContentLength
> = [-1]
> 11:22:47,540 [main] DEBUG client.HttpClientHelper         - <connect
> =
>
[sun.net.www.protocol.http.HttpURLConnection:http://localhost:8080/sciap
p/
>
ServletRedirector?Cactus_TestMethod=testFailedLogin&Cactus_TestClass=com
.s
>
tanchart.sci.customer.tests.TestCactusLoginAction&Cactus_AutomaticSessio
n=
> true&Cactus_Service=CALL_TEST]
> 
> 
> 11:22:47,550 [main] DEBUG ient.AutoReadHttpURLConnection  - Original
> connection =
>
sun.net.www.protocol.http.HttpURLConnection:http://localhost:8080/sciapp
/S
>
ervletRedirector?Cactus_TestMethod=testFailedLogin&Cactus_TestClass=com.
st
>
anchart.sci.customer.tests.TestCactusLoginAction&Cactus_AutomaticSession
=t
> rue&Cactus_Service=CALL_TEST
> 
> 
> 11:22:47,550 [main] DEBUG ient.AutoReadHttpURLConnection  -
Content-Length
> : [-1]
> 11:22:47,560 [main] DEBUG tests.TestCactusLoginAction     - Exception
in
> test
> java.net.SocketException: Socket closed
>      at java.net.SocketInputStream.socketRead(Native Method)
>      at java.net.SocketInputStream.read(SocketInputStream.java:90)
>      at
java.io.BufferedInputStream.read1(BufferedInputStream.java:227)
>      at java.io.BufferedInputStream.read(BufferedInputStream.java:285)
>      at java.io.FilterInputStream.read(FilterInputStream.java:118)
>      at java.io.PushbackInputStream.read(PushbackInputStream.java:168)
>      at java.io.FilterInputStream.read(FilterInputStream.java:97)
>      at
>
org.apache.cactus.client.AutoReadHttpURLConnection.copy(LogAspect.java(1
k)
> ,
> Compiled Code)
>      at
>
org.apache.cactus.client.AutoReadHttpURLConnection.getBufferedInputStrea
m(
> LogAspect.java(1k):184)
>      at
>
org.apache.cactus.client.AutoReadHttpURLConnection.getInputStream(LogAsp
ec
> t.java(1k):141)
>      at
>
org.apache.cactus.client.AbstractHttpClient.callRunTest(LogAspect.java(1
k)
> :195)
>      at
>
org.apache.cactus.client.AbstractHttpClient.dispatch1_doTest(LogAspect.j
av
> a(1k):120)
>      at
>
org.apache.cactus.client.AbstractHttpClient.around1_doTest(LogAspect.jav
a(
> 1k):1204)
>      at
>
org.apache.cactus.client.AbstractHttpClient.doTest(LogAspect.java(1k):11
5)
>      at
>
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
45
> 7)
>      at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
>      at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
>      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:122)
>      at junit.framework.TestSuite.runTest(TestSuite.java:173)
>      at junit.framework.TestSuite.run(TestSuite.java, Compiled Code)
>      at junit.textui.TestRunner.doRun(TestRunner.java:88)
>      at junit.textui.TestRunner.run(TestRunner.java:202)
>      at junit.textui.TestRunner.run(TestRunner.java:188)
>      at
> com.stanchart.sci.customer.tests.TestCactusLoginAction.main(Unknown
> Source)
> 11:22:47,580 [main] DEBUG tests.TestCactusLoginAction     -
-------------
> Test:
> testSuccessfulLogin
> 11:22:47,580 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_TestClass],
> [com.stanchart.sci.customer.tests.TestCactusLoginAction], [GET])
> 11:22:47,580 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,590 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_TestMethod], [testSuccessfulLogin], [GET])
> 11:22:47,590 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,600 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_AutomaticSession], [true], [GET])
> 11:22:47,600 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,600 [main] DEBUG client.ServletHttpClient        -
> >doTest([simulation URL
> = [null], automatic session = [true], cookies = [], headers = [], GET
> parameters =
> [[[Cactus_TestMethod] = [[testSuccessfulLogin]]][[Cactus_TestClass] =
>
[[com.stanchart.sci.customer.tests.TestCactusLoginAction]]][[Cactus_Auto
ma
> ticSession] =
> [[true]]]], POST parameters = []])
> 11:22:47,600 [main] DEBUG cactus.WebRequest               -
>addParameter
> ([Cactus_Service], [CALL_TEST], [GET])
> 11:22:47,600 [main] DEBUG cactus.WebRequest               -
<addParameter
> 11:22:47,600 [main] DEBUG client.HttpClientHelper         -
> >connect([simulation URL
> = [null], automatic session = [true], cookies = [], headers = [], GET
> parameters =
> [[[Cactus_TestMethod] = [[testSuccessfulLogin]]][[Cactus_TestClass] =
>
[[com.stanchart.sci.customer.tests.TestCactusLoginAction]]][[Cactus_Auto
ma
> ticSession] =
> [[true]]][[Cactus_Service] = [[CALL_TEST]]]], POST parameters = []])
> 11:22:47,600 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_TestMethod])
> 11:22:47,600 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@41069621]
> 11:22:47,610 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_TestClass])
> 11:22:47,610 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@5daa9621]
> 11:22:47,610 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_AutomaticSession])
> 11:22:47,610 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@5cba9621]
> 11:22:47,610 [main] DEBUG cactus.WebRequest               -
> >getParameterValuesGet
> ([Cactus_Service])
> 11:22:47,610 [main] DEBUG cactus.WebRequest               -
> <getParameterValuesGet =
> [[Ljava.lang.String;@5b629621]
> 11:22:47,660 [main] DEBUG client.HttpClientHelper         -
ContentLength
> = [-1]
> 11:22:47,660 [main] DEBUG client.HttpClientHelper         - <connect
> =
>
[sun.net.www.protocol.http.HttpURLConnection:http://localhost:8080/sciap
p/
>
ServletRedirector?Cactus_TestMethod=testSuccessfulLogin&Cactus_TestClass
=c
>
om.stanchart.sci.customer.tests.TestCactusLoginAction&Cactus_AutomaticSe
ss
> ion=true&Cactus_Service=CALL_TEST]
> 
> 
> 11:22:47,660 [main] DEBUG ient.AutoReadHttpURLConnection  - Original
> connection =
>
sun.net.www.protocol.http.HttpURLConnection:http://localhost:8080/sciapp
/S
>
ervletRedirector?Cactus_TestMethod=testSuccessfulLogin&Cactus_TestClass=
co
>
m.stanchart.sci.customer.tests.TestCactusLoginAction&Cactus_AutomaticSes
si
> on=true&Cactus_Service=CALL_TEST
> 
> 
> 11:22:47,660 [main] DEBUG ient.AutoReadHttpURLConnection  -
Content-Length
> : [-1]
> 11:22:47,660 [main] DEBUG tests.TestCactusLoginAction     - Exception
in
> test
> java.net.SocketException: Socket closed
>      at java.net.SocketInputStream.socketRead(Native Method)
>      at java.net.SocketInputStream.read(SocketInputStream.java:90)
>      at
java.io.BufferedInputStream.read1(BufferedInputStream.java:227)
>      at java.io.BufferedInputStream.read(BufferedInputStream.java:285)
>      at java.io.FilterInputStream.read(FilterInputStream.java:118)
>      at java.io.PushbackInputStream.read(PushbackInputStream.java:168)
>      at java.io.FilterInputStream.read(FilterInputStream.java:97)
>      at
>
org.apache.cactus.client.AutoReadHttpURLConnection.copy(LogAspect.java(1
k)
> ,
> Compiled Code)
>      at
>
org.apache.cactus.client.AutoReadHttpURLConnection.getBufferedInputStrea
m(
> LogAspect.java(1k):184)
>      at
>
org.apache.cactus.client.AutoReadHttpURLConnection.getInputStream(LogAsp
ec
> t.java(1k):141)
>      at
>
org.apache.cactus.client.AbstractHttpClient.callRunTest(LogAspect.java(1
k)
> :195)
>      at
>
org.apache.cactus.client.AbstractHttpClient.dispatch1_doTest(LogAspect.j
av
> a(1k):120)
>      at
>
org.apache.cactus.client.AbstractHttpClient.around1_doTest(LogAspect.jav
a(
> 1k):1204)
>      at
>
org.apache.cactus.client.AbstractHttpClient.doTest(LogAspect.java(1k):11
5)
>      at
>
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
45
> 7)
>      at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
>      at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
>      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:122)
>      at junit.framework.TestSuite.runTest(TestSuite.java:173)
>      at junit.framework.TestSuite.run(TestSuite.java, Compiled Code)
>      at junit.textui.TestRunner.doRun(TestRunner.java:88)
>      at junit.textui.TestRunner.run(TestRunner.java:202)
>      at junit.textui.TestRunner.run(TestRunner.java:188)
>      at
> com.stanchart.sci.customer.tests.TestCactusLoginAction.main(Unknown
> Source)
>
------------------------------------------------------------------------
--
> --------------------------------------------------------
> 
> 
> With Warm Regards,
> ISThomas
> 
> 
> 
> * * * The information contained in this message is legally privileged
and
> confidential
> information intended only for the use of the addressed individual or
> entity indicated in
> this message (or responsible for delivery of the message to such
person).
> It must not be
> read, copied, disclosed, distributed or used by any person other than
the
> addressee.
> Unauthorised use, disclosure or copying is strictly prohibited and may
be
> unlawful.
> Opinions, conclusions and other information on this message that do
not
> relate to the
> official business of any of the constituent companies of the TATA
> CONSULTANCY SERVICES
> shall be understood as neither given nor endorsed by the Group. If you
> have received this
> message in error, you should destroy this message and kindly notify
the
> sender by e-mail.
> Thank you. * * *
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to