Hi,
The configuration I ahve provided works with tomcat 5.x but it throws an error about creation of the poolable connection factory and complains about closed connections. Any ideas?
Configuration:
---------------------------------------------------------------------------
<Resource name="jdbc/SiForms" auth="container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/SiForms">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- DBCP database connection settings -->
<parameter>
<name>url</name>
<value>jdbc:oracle:oci:@eng-lab-02:2521:devp</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>username</name>
<value>jkasarkod</value>
</parameter>
<parameter>
<name>password</name>
<value>jkasarkod</value>
</parameter>
<!-- DBCP connection pooling options -->
<parameter>
<name>maxWait</name>
<value>3000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>100</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
Error:
------------------------------------------------------------------------------
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, caus
e: Closed Connection
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:825)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionP
rovider.java:59)
at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:381)
... 43 more
Caused by: java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:158)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:305)
at oracle.jdbc.driver.GetCharSetError.processError(T2CConnection.java:4019)
at oracle.jdbc.driver.T2CConnection.getCharSetIds(T2CConnection.java:3738)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:300)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:371)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:136)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:93)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:572)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.
java:82)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.ja
va:300)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:83
8)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:821)
... 46 more
Thanks,
Jeevak
|