Hi,
I am using JOnAS 2.2.7, Tomcat 3.2.1, jConnect 5.2 (all these on Windows NT)
to connect to a sybase 12 server(On Solaris).
I tried creating a connection pool to access the database. But when i run
the client i get the following erro.Please tell me what i am doing wrong.
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).
When I try to get the SQLWarnings attached to the connection I get a
NullPointer exception .
EJB code is
Connection con=null;
int i=0;
InitialContext ctx = null;
try {
ctx = new InitialContext();
DataSource ds =
(DataSource)ctx.lookup("java:comp/env/jdbc/NationalDB");
System.out.println("before getting connection");
con = ds.getConnection();
System.out.println("after getting connection");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from
SystemMessage");
while(rs.next()){
i++;
}
} catch(Exception ne) {
ne.printStackTrace();
System.out.println("general exception "+ne);
}
ejb-jar.xml has
<resource-ref>
<res-ref-name>jdbc/NationalDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jonas-ejb-jar.xml has
<jonas-resource>
<res-ref-name>jdbc/NationalDB</res-ref-name>
<jndi-name>NationalDB</jndi-name>
</jonas-resource>
I also have a Sybase1 file in the JONAS_ROOT folder which has the following
datasource.name NationalDB
datasource.url jdbc:sybase:Tds:ip:port/NationalTV
datasource.classname com.sybase.jdbc2.jdbc.SybDriver
datasource.username uid
datasource.password pwd
Sorry for the long post but i have been trying for past two days without any
progress.
Regards,
Ramkumar Sampathkumaran
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".