zcwslnh / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Using Oracle JDBC Driver and ImplicitConnnectionCache, getting: java.sql.SQLNonTransientConnectionException: User credentials doesn't match the existing ones #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install latest JDBC drivers from Oracle
2. use Oracle DB Pooling

What is the expected output? What do you see instead?
Getting 
DataBase:   java.sql.SQLNonTransientConnectionException: User credentials 
doesn't match the existing ones

Under the DETAILS section of the /monitoring path.

What version of the product are you using?
v 1.20.0

On what application server
Tomcat 6.0.20
JDK 1.6.0.21

operating system
Linux Ubuntu 10.04

Please provide any additional information below.
I tried removing the MinLimit= parameter in my $CATALINA_BASE/conf/server.xml 
file.  This is my config:
    <Resource auth="Container"
        driverClassName="oracle.jdbc.OracleDriver"
    factory="oracle.jdbc.pool.OracleDataSourceFactory"
    logAbandoned="true" 
    name="jdbc/a"
        type="oracle.jdbc.pool.OracleDataSource"
        connectionCachingEnabled="true"
        connectionCacheName="dbrep"
        connectionCacheProperties="{MaxLimit=4, ConnectionWaitTimeout=600, ValidateConnection=true}"
    url="jdbc:oracle:thin:login/pass@localhost:1521:XXXX" />
    <Resource auth="Container"
        driverClassName="oracle.jdbc.OracleDriver"
    factory="oracle.jdbc.pool.OracleDataSourceFactory"
    logAbandoned="true" 
    name="jdbc/b"
        type="oracle.jdbc.pool.OracleDataSource"
        connectionCachingEnabled="true"
        connectionCacheName="dbrt"
        connectionCacheProperties="{MaxLimit=1, ConnectionWaitTimeout=600, ValidateConnection=true}"
    url="jdbc:oracle:thin:login/pass@localhost:1521:XXXX" />

Original issue reported on code.google.com by eli...@espoc.com on 19 Oct 2010 at 1:33

GoogleCodeExporter commented 9 years ago
It seems to me that you have exactly the same sql exception in the datasources 
when you don't use javamelody. If I'm right, this can't be an issue in 
javamelody.

I have in fact the same exception when I use a DataSource defined like yours in 
server.xml.

And it works for me when I replace the following in server.xml

url="jdbc:oracle:thin:login/pass@localhost:1521:XXXX"

by 

userName="login" passWord="pass" 
url="jdbc:oracle:thin:@localhost:1521:XXXX"

Do you confirm that?

Original comment by evernat@free.fr on 21 Oct 2010 at 9:40

GoogleCodeExporter commented 9 years ago
closing as not a bug

Original comment by evernat@free.fr on 30 Oct 2010 at 8:12

GoogleCodeExporter commented 9 years ago
Just a quick comment for anyone else that runs into this:  it seems to work 
when we put in userName and passWord with the EXACT CAPITALIZATION.  username= 
and password= causes the same errors.  Just FYI for anyone in the future.  
Thanks for all the help!  Wonderful product!

Original comment by eli...@espoc.com on 30 Oct 2010 at 12:11