java.sql.SQLException

Network error IOException: Connection refused: connect at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410).. My Code is.... String driverName = "net.sourceforge.jtds.jdbc.Driver"; String url = "jdbc:jtds:sqlserver://localhost:1433"; Class.forName(driverName); DriverManager.getConnection(url); System.out.println("Connected Successfully"); Please give the solution for that one... Thanks...

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 web4965

  • via Unknown by Unknown author,
  • via Stack Overflow by Omu
    ,
  • Stack trace

    • java.sql.SQLException: Network error IOException: Connection refused: connect at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410).. My Code is.... String driverName = "net.sourceforge.jtds.jdbc.Driver"; String url = "jdbc:jtds:sqlserver://localhost:1433"; Class.forName(driverName); DriverManager.getConnection(url); System.out.println("Connected Successfully"); Please give the solution for that one... Thanks... at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.thanas.test.DBSCONNECTION.getConnection(DBSCONNECTION.java:20) at com.thanas.test.DBSCONNECTION.main(DBSCONNECTION.java:10) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:307) at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:257) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:311) ... 6 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

    ruifungruifung
    Once,
    Unknown visitor
    Unknown visitorOnce,
    treefolktreefolk
    5 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    282 more bugmates