java.net.ConnectException

Connection refused

Samebug tips4

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web4936

  • via Unknown by 843833,
  • via httpunit by brianpitts
    ,
  • Stack trace

    • java.net.ConnectException: Connection refused at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1227) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1221) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:910) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367) at com.meterware.httpunit.HttpWebResponse.readResponseHeader(HttpWebResponse.java:162) at com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:200) at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:56) at com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:67) at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:76) at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:164) at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128) at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121) at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:102) at com.meterware.httpunit.WebClient.getResponse(WebClient.java:87) at org.openxava.tests.ModuleTestBase.resetModule(ModuleTestBase.java:184) at org.openxava.tests.ModuleTestBase.setUp(ModuleTestBase.java:92) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:382) at sun.net.www.http.HttpClient.openServer(HttpClient.java:509) at sun.net.www.http.HttpClient.<init>(HttpClient.java:231) at sun.net.www.http.HttpClient.New(HttpClient.java:304) at sun.net.www.http.HttpClient.New(HttpClient.java:316) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938) at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLConnection.java:1952) at com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResponse.java:216) at com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:198) ... 26 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    juzijuzi
    91 times, last one
    PilleoPilleo
    19 times, last one
    Михайло ТітовМихайло Тітов
    22 times, last one
    rocdayrocday
    17 times, last one
    Unknown UserUnknown User
    Once,
    277 more bugmates