tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amitava Chakraborty <>
Subject db.getConnection() working but db.getConnection("username","password") not working for JNDI Connection
Date Mon, 28 Jan 2008 06:23:00 GMT

I am using

 java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511

IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32
4 (JIT enabled)
J9VM - 20060501_06428_lHdSMR
JIT  - 20060428_1800_r8
GC   - 20060501_AA)
JCL  - 20060511a

Tomcat 5.5.21

DataBase : Informix V 11.10   Informix JDBC Driver 3.10 JC1

During connecting through JNDI datasource , db.getConnection() is working
perfectly. But db.getConnection("myusername", "myPassword") is not working.
It is saying

java.lang.UnsupportedOperationException: Not supported by BasicDataSource


But I checked the

where it is saying getconnection method with username and password is
supported. I am using javax.sql.DataSource. I donot want to use my username
and password in the context.xml or server.xml for security issue. Please
help me how can I do it.


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message