Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Unable to connect to SSL enabled Sybase Database

Hello,

I am trying to do a jdbc connection to sybase ssl enabled database.

I am able to connect to database via isql64 for both ssl and non-ssl db connection.

But jdbc connection for ssl isn't working.

Getting following errors/exceptions:

→jdbcurl=jdbc:sybase:Tds:phoenix524618.dev3sub1phx.databasede3phx.oraclevcn.com:5000/qa_db?ENABLE_SSL=true

Exception in thread "main" java.lang.Exception: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused (Connection refused)

at testSybase.dbconn(testSybase.java:20)

at testSybase.main(testSybase.java:51)

Caused by: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused (Connection refused)

at com.sybase.jdbc4.jdbc.ErrorMessage.raiseError(ErrorMessage.java:819)

at com.sybase.jdbc4.jdbc.ErrorMessage.raiseErrorCheckDead(ErrorMessage.java:1250)

at com.sybase.jdbc4.tds.Tds.handleIOE(Tds.java:5384)

at com.sybase.jdbc4.tds.Tds.handleIOE(Tds.java:5329)

at com.sybase.jdbc4.tds.Tds.login(Tds.java:571)

at com.sybase.jdbc4.jdbc.SybConnection.tryLogin(SybConnection.java:529)

at com.sybase.jdbc4.jdbc.SybConnection.handleHAFailover(SybConnection.java:3861)

at com.sybase.jdbc4.jdbc.SybConnection.<init>(SybConnection.java:382)

at com.sybase.jdbc4.jdbc.SybConnection.<init>(SybConnection.java:282)

at com.sybase.jdbc4.jdbc.SybDriver.connect(SybDriver.java:258)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at testSybase.dbconn(testSybase.java:14)

... 1 more

Caused by: java.net.ConnectException: Connection refused (Connection refused)

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:607)

at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:293)

at com.sybase.jdbc4.jdbc.SybSSLSocketFactory.createSocket(SybSSLSocketFactory.java:340)

at com.sybase.jdbc4.timedio.SocketDbio.doConnect(SocketDbio.java:98)

at com.sybase.jdbc4.timedio.InStreamMgr.<init>(InStreamMgr.java:109)

at com.sybase.jdbc4.tds.Tds.login(Tds.java:537)

... 9 more

Comments
Post Details
Added on Jul 15 2024
0 comments
104 views