Hi,
I am trying to use JOnAS 2.2.7 alongwith tomcat 3.2.1 on a NT machine.
I have a bean which is trying to access the database using the following
code:
ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("NationalDB");
con = ds.getConnection();
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from SystemMessage");
However when it executes the I get the following error. What to do to solve
this problem?
Could not get Connection on jdbc:sybase:Tds:207.41.229.5:6500/NationalTV:
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained
to
this exception for the reason(s).
at
com.database.connect.DatabaseBean.connectDatabase(DatabaseBean.java:5
5)
at
com.database.connect.JOnASDatabaseBeanRemote.connectDatabase(JOnASDat
abaseBeanRemote.java:37)
at
com.database.connect.JOnASDatabaseBeanRemote_Skel.dispatch(JOnASDatab
aseBeanRemote_Skel.java:35)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Sour
ce)
at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained
to
this exception for the reason(s).
at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:439)
at com.sybase.jdbc2.tds.Tds.processLoginAckToken(Tds.java:2901)
at com.sybase.jdbc2.tds.Tds.doLogin(Tds.java:422)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:349)
at
com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:213)
at
com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java
:190)
at
com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:169)
at
com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:122)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:175)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at
org.objectweb.jonas.jdbc_xa.XADataSourceImpl.getXAConnection(XADataSo
urceImpl.java:159)
at
org.objectweb.jonas.dbm.ConnectionManager.getConnection(ConnectionMan
ager.java:308)
at
org.objectweb.jonas.dbm.ConnectionManager.getConnection(ConnectionMan
ager.java:271)
at
com.database.connect.DatabaseBean.connectDatabase(DatabaseBean.java:4
3)
at
com.database.connect.JOnASDatabaseBeanRemote.connectDatabase(JOnASDat
abaseBeanRemote.java:37)
at
com.database.connect.JOnASDatabaseBeanRemote_Skel.dispatch(JOnASDatab
aseBeanRemote_Skel.java:35)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Sour
ce)
at java.lang.Thread.run(Unknown Source)
general exception java.sql.SQLException: JZ00L: Login failed. Examine the
SQLWa
rnings chained to this exception for the reason(s).
Thanks in advance,
Ramkumar
This e-mail and any files transmitted with it are for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.com
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".
Could not get connection : SQLExceptiom JZ00L
Sampathkumaran, Ramkumar (CTS) Tue, 24 Apr 2001 03:27:32 -0700
