Skip to Content

SYBASE CONNECTION WITH JAVA ERROR

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)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2016 at 11:21 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.