on 10-04-2016 5:53 AM
i am trying to connect sybase with java with the following code :
try{
Class.forName("com.sybase.jdbc4.jdbc.SybDriver");
} catch (ClassNotFoundException cnfe){
System.out.println("Could not find the JDBC driver!");
System.exit(1);
}
Connection conn = null;
try {
conn = DriverManager.getConnection("jdbc:sybase:Tds:Host:Port#/DBNAME","UName","Pass");
System.out.println("Connection done");
} catch (SQLException sqle) {
sqle.printStackTrace();;
System.exit(1);
}
}
and i am getting this exeception :
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
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(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at test.SybaseExample2.main(SybaseExample2.java:98)
Hi
Please go through below mentioned SAP notes
https://launchpad.support.sap.com/#/notes/2178482/E
https://launchpad.support.sap.com/#/notes/1923830/E
Hope they help.
Regards
Prithviraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.