Problem with Socket connection when running JUnit [message #210330] |
Wed, 20 July 2005 15:37 |
Eclipse User |
|
|
|
Originally posted by: kpram.dartmouth.edu
I am unable to run my JUnit tests from within eclipse, after being able
to do so for several weeks.
When I attempt to run or debug a unit test, I get an exception:
Could not connect to: : 33048
java.net.SocketException: Invalid argument or cannot assign requested
address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.ja va:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.conne ct(RemoteTestRunner.java:744)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:326)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:186)
This error doesn't happen when I run the test from the command line.
The socket number goes up by 21 every time.
The lowest socket number I made note of was 32771, which is suspiciously
close to 2^15. There were a handful of failures before I noted that number.
Upgrading eclipse to 3.1 didn't help. Making a new workspace didn't
help. Making a new project didn't help.
I can see java listening on the socket via netstat, but I don't know why
the connection is failing.
Any suggestions? I'm stumped.
|
|
|
|
Re: Problem with Socket connection when running JUnit [message #210361 is a reply to message #210345] |
Wed, 20 July 2005 16:39 |
Eclipse User |
|
|
|
Originally posted by: kpram.dartmouth.edu
A firewall is active, but was active before the problem started to occur.
In addition, I opened a port on the firewall corresponding to the next
socket that would be attempted, and the socket still failed to open,
with an identical message (except a change in the socket number) to runs
with the wall closed.
I would rather not drop the entire firewall for what should be a purely
local connection.
Kevin
|
|
|
|
Re: Problem with Socket connection when running JUnit [message #210490 is a reply to message #210431] |
Thu, 21 July 2005 14:42 |
Eclipse User |
|
|
|
Originally posted by: kpram.dartmouth.edu
I was using 1.4.2 under the new kernel. As you say, using 1.5 or the
previous kernel solves the problem. Thank you very much!
Kevin
eddie wrote:
> Are you using jdk 1.4.2 under Linux and just update the kernel? I have
> the same situation with you, after using the old kernel or using jdk 1.5
> the problem was fixed.
>
>>
>> This error doesn't happen when I run the test from the command line.
>> The socket number goes up by 21 every time.
>>
>> The lowest socket number I made note of was 32771, which is
>> suspiciously close to 2^15. There were a handful of failures before I
>> noted that number.
>>
>> Upgrading eclipse to 3.1 didn't help. Making a new workspace didn't
>> help. Making a new project didn't help.
>>
>> I can see java listening on the socket via netstat, but I don't know
>> why the connection is failing.
>>
>> Any suggestions? I'm stumped.
|
|
|
Re: Problem with Socket connection when running JUnit [message #217462 is a reply to message #210490] |
Thu, 20 October 2005 19:37 |
Luca Di Stefano Messages: 41 Registered: July 2009 |
Member |
|
|
--=-q65NfRoS0Nu8PCv0GeJD
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi,
I had the same problem: take care to have a default constructor in your
test case class, not only the one with the string parameter.
hope that helps,
Luca
On Thu, 2005-07-21 at 10:42 -0400, Kevin Mitcham wrote:
> I was using 1.4.2 under the new kernel. As you say, using 1.5 or the
> previous kernel solves the problem. Thank you very much!
>
> Kevin
>
> eddie wrote:
> > Are you using jdk 1.4.2 under Linux and just update the kernel? I have
> > the same situation with you, after using the old kernel or using jdk 1.5
> > the problem was fixed.
> >
>
> >>
> >> This error doesn't happen when I run the test from the command line.
> >> The socket number goes up by 21 every time.
> >>
> >> The lowest socket number I made note of was 32771, which is
> >> suspiciously close to 2^15. There were a handful of failures before I
> >> noted that number.
> >>
> >> Upgrading eclipse to 3.1 didn't help. Making a new workspace didn't
> >> help. Making a new project didn't help.
> >>
> >> I can see java listening on the socket via netstat, but I don't know
> >> why the connection is failing.
> >>
> >> Any suggestions? I'm stumped.
--=-q65NfRoS0Nu8PCv0GeJD
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I had the same problem: take care to have a default constructor in your test case class, not only the one with the string parameter.<BR>
<BR>
hope that helps,<BR>
<BR>
Luca<BR>
<BR>
<BR>
On Thu, 2005-07-21 at 10:42 -0400, Kevin Mitcham wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">I was using 1.4.2 under the new kernel. As you say, using 1.5 or the </FONT>
<FONT COLOR="#000000">previous kernel solves the problem. Thank you very much!</FONT>
<FONT COLOR="#000000">Kevin</FONT>
<FONT COLOR="#000000">eddie wrote:</FONT>
<FONT COLOR="#000000">> Are you using jdk 1.4.2 under Linux and just update the kernel? I have </FONT>
<FONT COLOR="#000000">> the same situation with you, after using the old kernel or using jdk 1.5 </FONT>
<FONT COLOR="#000000">> the problem was fixed.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> This error doesn't happen when I run the test from the command line.</FONT>
<FONT COLOR="#000000">>> The socket number goes up by 21 every time.</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> The lowest socket number I made note of was 32771, which is </FONT>
<FONT COLOR="#000000">>> suspiciously close to 2^15. There were a handful of failures before I </FONT>
<FONT COLOR="#000000">>> noted that number.</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> Upgrading eclipse to 3.1 didn't help. Making a new workspace didn't </FONT>
<FONT COLOR="#000000">>> help. Making a new project didn't help.</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> I can see java listening on the socket via netstat, but I don't know </FONT>
<FONT COLOR="#000000">>> why the connection is failing.</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> Any suggestions? I'm stumped.</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-q65NfRoS0Nu8PCv0GeJD--
|
|
|
Powered by
FUDForum. Page generated in 0.02631 seconds