log4jdbc
log4jdbc copied to clipboard
"Invalid Oracle URL specified" with JDBC pooling
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 [email protected]
on 6 Aug 2010 at 11:27
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 [email protected]
on 25 Aug 2010 at 12:47
- Added labels: ****
- Removed labels: ****
update labels.
Original comment by [email protected]
on 26 Jun 2011 at 9:07
- Added labels: Priority-Low, Type-Other
- Removed labels: Priority-Medium, Type-Defect
i have the same problem.
Original comment by [email protected]
on 9 Oct 2014 at 7:26
- Added labels: ****
- Removed labels: ****
If people still want this: initial support for pooled and XA datasources is available in my branch: https://github.com/Jurrie/log4jdbc/tree/feature/Add_XA_support Please note that this is pretty much untested (except for XA datasources). Please let me know if things work or not.