jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nicolas.duminil" <nicolas.dumi...@simplex-software.fr>
Subject Re: Socket exception in a simples Cactus test
Date Thu, 30 Oct 2008 15:42:39 GMT

Petar,

You must be mistaken as cactus starts perfectly in Eclipse 3.3, without any
Jetty, in the WebLogic HTTP container. The problem I was experimenting was
because of type error in the URL. Many thanks anyway.

Nicolas


Petar Tahchiev wrote:
> 
> Hi Niclas,
> 
> the only way you can start Cactus in Eclipse is by using Jetty as
> a container.
> 
> Cheers, Petar.
> 
> 2008/10/30 nicolas.duminil <nicolas.duminil@simplex-software.fr>:
>>
>> Greetings,
>>
>> I'm doing a simple Cactus test using Eclipse 3.3 with WTP. Here is the
>> class
>> I'm trying to test in the WebLogic 10.3g HTTP container:
>>
>> public class Basic
>> {
>>  public String saySomething (String something)
>>  {
>>    return "I'm saying " + something;
>>  }
>> }
>>
>> I created the following Servlet Test Case:
>>
>> public class BasicTest extends ServletTestCase
>> {
>>  public void testSaySomething()
>>  {
>>    assertTrue (new Basic().saySomething("Hello").equals("I'm saying
>> Hello"));
>>  }
>> }
>>
>> The test is done using a run configuration having BasicTest as the class
>> name and -Dcactus.contextURL=http://localhst:8080/<root-ctx> as VM
>> arguments, where <root-ctx> is the webapp context root.
>>
>> Here is the exception raised:
>>
>>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
>>        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>>        at java.net.Socket.connect(Socket.java:519)
>>        at java.net.Socket.connect(Socket.java:469)
>>        at java.net.Socket.<init>(Socket.java:366)
>>        at java.net.Socket.<init>(Socket.java:180)
>>        at
>> org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:86)
>>        at
>> org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:652)
>>        at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:628)
>>        at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:526)
>>        at
>> org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody0(HttpClientConnectionHelper.java:142)
>>        at
>> org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody1$advice(HttpClientConnectionHelper.java:288)
>>        at
>> org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect(HttpClientConnectionHelper.java)
>>        at
>> org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:162)
>>        at
>> org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
>>        at
>> org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:288)
>>        at
>> org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
>>        at
>> org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
>>        at
>> org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
>>        at
>> org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:288)
>>        at
>> org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
>>        at
>> org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
>>        at
>> org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
>>        at
>> org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
>>        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:118)
>>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>        at
>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>>        at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>>
>> Many thanks in advance for your help.
>>
>> Nicolas
>> --
>> View this message in context:
>> http://www.nabble.com/Socket-exception-in-a-simples-Cactus-test-tp20243783p20243783.html
>> Sent from the Cactus - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> -- 
> Regards, Petar!
> Karlovo, Bulgaria.
> - - - - - - - -
> | Author @ Manning Publications.
> | Technical Consultant @ HP
> | BGJUG-Bulgarian Java User Group Leader.
> | Apache Jakarta PMC member.
> | Jakarta Cactus Lead Developer.
> | Blogger: http://weblogs.java.net/blog/paranoiabla/
> - - - - - - - -
> Public PGP Key at:
> https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
> Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Socket-exception-in-a-simples-Cactus-test-tp20243783p20249532.html
Sent from the Cactus - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


Mime
View raw message