JUnit problem

H

hicks

I'm trying to run a JUnit test in Eclipse 3.1. Google turned up no
solutions, so could I ask if anyone here can suggest anything?
When running the test I see the following error in the console. The
JUnit view also does not look correct, so I'm wondering if it's a
version problem. According to Eclipse, the version of the JUnit plugin
is 3.8.1.


Could not connect to: : 2065
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: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.SocketClientConnection.connect(SocketClientConnection.java:31)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:663)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:413)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:598)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:235)
 
O

Oliver Wong

I'm trying to run a JUnit test in Eclipse 3.1. Google turned up no
solutions, so could I ask if anyone here can suggest anything?
When running the test I see the following error in the console. The
JUnit view also does not look correct, so I'm wondering if it's a
version problem. According to Eclipse, the version of the JUnit plugin
is 3.8.1.


Could not connect to: : 2065
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java: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.SocketClientConnection.connect(SocketClientConnection.java:31)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:663)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:413)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:598)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:235)

Did you try rebooting Eclipse and/or your computer? This has happened to
be twice before, and restarting seemed to fix it.

- Oliver
 
H

hicks

Oliver said:
Did you try rebooting Eclipse and/or your computer? This has happened to
be twice before, and restarting seemed to fix it.

- Oliver

Yes, rebooted and restarted Eclipse. Still no joy. The annoying thing
is, this did work at some point since I have JUnit test cases defined
and managed to run them in the past.
 
Joined
Oct 1, 2008
Messages
1
Reaction score
0
Junit ConnectionException > cactus.properties

Hi,

Had the same issue, rebooting didn't help.
I migrated from WAS 5.1 to WAS 6.1 and got issues when running unit tests under 6.1.
Found out that I forgot to update my cactus.properties file to point to the new port number for WAS 6.1 (9081 instead of 9080).
After changing the port number in the cactus.properties file and a restart of the server, the issue was solved.

Kind regards,
Manfred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top