longzenvo / log4jdbc

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

"Invalid Oracle URL specified" with JDBC pooling #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using Oracle 10gR2 and it's own JDBC driver, on Tomcat 5.5/Linux.
2. Use the following in your resource file:

<Resource name="jdbc/myConnection" auth="Container"
    type="oracle.jdbc.pool.OracleDataSource"
    driverClassName="net.sf.log4jdbc.DriverSpy"
    factory="oracle.jdbc.pool.OracleDataSourceFactory"

    url="jdbc:log4jdbc:oracle:thin:@localhost:1521:MYSID"
    user="MyUSer"
    password="MyPassword"
/>

I'm expecting it to work as is, however I get the following exception:

Caused by: java.sql.SQLException: Invalid Oracle URL specified
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
        at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:301)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:221)
        at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:157)
        at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:94)
        at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1529)
        at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:464)
        at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:333)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:404)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:189)
...

I'm using log4jdbc4-1.2beta2.jar and slf4j-api-1.5.11.jar.

At first sight it looks like "jdbc:log4" is not removed from the URL before 
providing it to the driver class oracle.jdbc.OracleDriver.

Original issue reported on code.google.com by franklam...@gmail.com on 6 Aug 2010 at 11:27

GoogleCodeExporter commented 9 years ago
This might be caused because datasources are not supported.  I haven't had time 
to integrate that yet.  Various people have submitted sample implementations 
(look at the faq and issues) if you want to try and get it going yourself.  
Otherwise you may have to wait a while.  Very busy lately...

Original comment by arthur.b...@gmail.com on 25 Aug 2010 at 12:47

GoogleCodeExporter commented 9 years ago
update labels.

Original comment by arthur.b...@gmail.com on 26 Jun 2011 at 9:07

GoogleCodeExporter commented 9 years ago
i have the same problem.

Original comment by paotien...@gmail.com on 9 Oct 2014 at 7:26