Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JZ00L: Login failed

112 views
Skip to first unread message

AndreJ van der Zee

unread,
Aug 23, 1999, 3:00:00 AM8/23/99
to

Hi,

i am using Adaptive Server 6.0 on Windows 98 and am trying to connect with
jConnect 5.0 from a Unix platform to the sample database "asademo", but i am
not able to get a succesful login.

The Adaptive Server is running properly and with Interactive SQL on the
Windows 98 I am able to get a succesfull login with the same user-id and
password as I am using for the connection with jConnect from the Unix
platform.

I also tried creating new logins with GRANT CONNECT in the specific database
but the same errors appear when using them to connect with jConnect.

Here my testclass and the error messages:

import java.sql.*;

public class TestConnection {

public static void main(String [] args) {

String url = "jdbc:sybase:Tds:x.x.x.x:2638/asademo";

Connection con;
Statement stmt;

try {
Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}

try {
con = DriverManager.getConnection(url, "DBA", "SQL");

}
catch(SQLException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
e.printStackTrace();

SQLException n = e.getNextException();
if(n != null)
System.err.println(n.getMessage());
}
}
}

Here the error-messages and a stacktrace:

(mavdzee@ow109 3) java TestConnection

ClassNotFoundException: JZ00L: Login failed.
Examine the SQLWarnings chained to this exception for the reason(s).
java.sql.SQLException: JZ00L: Login failed.
Examine the SQLWarnings chained to this exception for the reason(s).

at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at java.sql.SQLException.<init>(SQLException.java:64)
at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:418)
at com.sybase.jdbc2.tds.Tds.processLoginAckToken(Compiled Code)
at com.sybase.jdbc2.tds.Tds.doLogin(Tds.java:297)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:236)
at com.sybase.jdbc2.jdbc.SybConnection.<init>(Compiled Code)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:219)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at TestConnection.main(CreateConnection.java:22)

JZ006: Caught IOException: java.net.SocketException: Connection reset by
peer: Connection reset by peer

(mavdzee@ow109 4)

What do i do wrong?

AndreJ

__________________________________________________________

AndreJ van der Zee
Molukkenstraat 114 K (vast) of Oosterpark 79hs (tot 1 september)
1094 BV Amsterdam 1092 AV Amsterdam
tel: (020) 6920064 tel: (020) 6927050

email: mav...@wins.uva.nl (universiteit)
and...@cable.a2000.nl (anders)
__________________________________________________________

Lance & Tonya Andersen

unread,
Aug 23, 1999, 3:00:00 AM8/23/99
to

Your snippet of code looks ok.

How did you start ASA? Make sure you are using dbsrv6 not starting from
Sybase Central.

Lance
team sybase

0 new messages