A
Anonymous
I downloaded Oracle's JDBC driver from
www.oracle.com
I have Websphere Application Server 5.0 installed
on my system (Windows 2000)
I configured a JDBC Provider with the Oracle JDBC Driver.
After configuring the JDBC Provider, I configured a DataSource.
My servlet can lookup the DataSource via JNDI.
However, an exception occurs when I invoke getConnection()
on the DataSource object.
getConnection() throws a java.sqlSQLException
Where do I specify the JDBC URL?
I noticed that each DataSource can have "Custom Properties" defined
via the Admin Console.
Should I set any Custom Properties?
Here is the stack trace:
Error 500: Server caught unhandled exception from servlet [myappservlet]:
java.sql.SQLException: Invalid Oracle URL specified:
OracleDataSource.makeURL at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130) at
oracle.jdbc.pool.OracleDataSource.makeURL(OracleDataSource.java:968) at
oracle.jdbc.pool.OracleDataSource.getURL(OracleDataSource.java:577) at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.
java:115) at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.
java:86) at
com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:
643) at java.security.AccessController.doPrivileged(Native Method) at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurati
onHelper.java:638) at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource
..java:189) at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnect
ion(WSManagedConnectionFactoryImpl.java:503) at
com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(Fr
eePool.java:1106) at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java
:897) at
com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1065) at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:5
60) at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:
374) at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.ja
va:205) at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.ja
va:180)
at myapplication.Util.getDBConnection(Util.java:95) at
[...]
www.oracle.com
I have Websphere Application Server 5.0 installed
on my system (Windows 2000)
I configured a JDBC Provider with the Oracle JDBC Driver.
After configuring the JDBC Provider, I configured a DataSource.
My servlet can lookup the DataSource via JNDI.
However, an exception occurs when I invoke getConnection()
on the DataSource object.
getConnection() throws a java.sqlSQLException
Where do I specify the JDBC URL?
I noticed that each DataSource can have "Custom Properties" defined
via the Admin Console.
Should I set any Custom Properties?
Here is the stack trace:
Error 500: Server caught unhandled exception from servlet [myappservlet]:
java.sql.SQLException: Invalid Oracle URL specified:
OracleDataSource.makeURL at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130) at
oracle.jdbc.pool.OracleDataSource.makeURL(OracleDataSource.java:968) at
oracle.jdbc.pool.OracleDataSource.getURL(OracleDataSource.java:577) at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.
java:115) at
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.
java:86) at
com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:
643) at java.security.AccessController.doPrivileged(Native Method) at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurati
onHelper.java:638) at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource
..java:189) at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnect
ion(WSManagedConnectionFactoryImpl.java:503) at
com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(Fr
eePool.java:1106) at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java
:897) at
com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1065) at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:5
60) at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:
374) at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.ja
va:205) at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.ja
va:180)
at myapplication.Util.getDBConnection(Util.java:95) at
[...]