on 05-10-2018 8:22 AM
Hi Experts.
I am using jconn4 driver to connect to my local SQLA 17 database, however I am always given the error below:
java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused: connect
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.handleSQLE(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.handleHAFailover(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.<init>(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.<init>(Unknown Source)
at com.sybase.jdbc4.jdbc.SybDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.pg.ecom.project.mng.common.dao.DaoManager.getConnection(DaoManager.java:145)
at com.pg.ecom.project.mng.common.dao.DaoManager.<init>(DaoManager.java:96)
at com.pg.ecom.project.mng.common.dao.DaoManager.getInstance(DaoManager.java:82)
at com.pg.ecom.project.mng.jfc.MosisNG.<init>(MosisNG.java:235)
at com.pg.ecom.project.mng.jfc.MosisNG.main(MosisNG.java:631)
I am already stuck on this problem for a few hours and kind of desperate to have an answer. I am using the below code to connect to my database:
String dbUri = "jdbc:sybase:Tds:localhost:2638/mosis"
String user= "MOSIAPPS"
String passwd = Decryptor.decrypt(password);
con = DriverManager.getConnection(dbUri, user, passwd);
Would anyone be kind enough to give me an expert advice on this? I am already down my schedule due to this problem.
Kindest Regards,
Pau
jConnect depends on TCP/IP for connectivity. You need to ensure that the SQL Anywhere database server that you attempting to connect is configured to listen on TCP/IP. If you are running a standalone engine (i.e., dbeng17), you will need to add -x tcpip to thje engine startup..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.