When Opening A Connection On Datasource Receives NullPointerException In PooledConnectionUsage (Doc ID 471900.1)

Last updated on OCTOBER 02, 2017

Applies to:

Oracle Containers for J2EE - Version: 10.1.2.2.0
This problem can occur on any platform.

Symptoms

After applying patch for  <<Bug 5765848>> setting min-connections and max-connections in data-source definition makes the application to fail and it hangs.  If the patch is installed but these settings are not specified application works OK but data-source do not pool connections.

The error was:

com.evermind.sql.OrionPooledDataSource@7d42ce8e: Started
..
Created new physical connection: oracle.jdbc.driver.T4CXAConnection@549c4e93
null: Connection oracle.jdbc.driver.T4CXAConnection@549c4e93 allocated (Pool size: 0)
Created new physical connection: oracle.jdbc.driver.T4CXAConnection@23c38e93
null: Connection oracle.jdbc.driver.T4CXAConnection@23c38e93 allocated (Pool size: 0)
Created new physical connection: oracle.jdbc.driver.T4CXAConnection@28e18e93
null: Connection oracle.jdbc.driver.T4CXAConnection@28e18e93 allocated (Pool size: 0)
     --->     (many more lines about creating physical connection)
...
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@7280ce8c to pool (Pool size: 47)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@79c5ce8c to pool (Pool size: 48)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@402f0e8c to pool (Pool size: 49)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@2edc4e8e to pool (Pool size: 50)
Created new physical connection: oracle.jdbc.driver.T4CXAConnection@2edc4e8e
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@2edc4e8e to pool (Pool size: 49)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@2edc4e8e to pool (Pool size: 50)
* ----> The pool was defined of 50 connections. *
Created new physical connection: oracle.jdbc.driver.T4CXAConnection@2edc4e8e (*1)
Error in connection:
2007-12-20 09:06:36,588 [Orion Launcher] ERROR - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'primarySessionFactory' defined in URL [jndi:/eseiprodapp/oracle/web/j2ee/ESEIPROD/applications/sei-2.3.ear/sei-ui-standard-2.3/WEB-INF/lib/sei-persistence-2.3.jar/beans.spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
Caused by:
java.lang.NullPointerException
at com.evermind.sql.PooledConnectionUsage.connectionErrorOccurred(PooledConnectionUsage.java:106)
at oracle.jdbc.pool.OraclePooledConnection.callListener(OraclePooledConnection.java:496)
at oracle.jdbc.pool.OraclePooledConnection.close(OraclePooledConnection.java:246)
at oracle.jdbc.pool.OracleConnectionCacheImpl.closeSingleConnection(OracleConnectionCacheImpl.java:610)
at oracle.jdbc.pool.OracleConnectionCacheImpl.closePooledConnection(OracleConnectionCacheImpl.java:555)
at oracle.jdbc.pool.OracleConnectionEventListener.connectionErrorOccurred(OracleConnectionEventListener.java:127)
at oracle.jdbc.pool.OraclePooledConnection.callListener(OraclePooledConnection.java:496)
at oracle.jdbc.pool.OraclePooledConnection.close(OraclePooledConnection.java:246)
at com.evermind.sql.OrionPooledDataSource.removeUsedConnection(OrionPooledDataSource.java:794) (*2)
at com.evermind.sql.PooledConnectionUsage.connectionClosed(PooledConnectionUsage.java:64)
at oracle.jdbc.pool.OraclePooledConnection.callListener(OraclePooledConnection.java:494)
at oracle.jdbc.pool.OraclePooledConnection.logicalClose(OraclePooledConnection.java:463)
at oracle.jdbc.driver.LogicalConnection.closeInternal(LogicalConnection.java:220)
at oracle.jdbc.driver.LogicalConnection.close(LogicalConnection.java:193)
at com.evermind.sql.OrionCMTConnection.closePhysicalConnection(OrionCMTConnection.java:624)
at com.evermind.sql.OrionCMTConnection.close(OrionCMTConnection.java:396)

Data-source definition:

<data-source location="jdbc/esds" class="com.evermind.sql.OrionCMTDataSource"
        connection-driver="oracle.jdbc.driver.OracleDriver"
        min-connections="50" max-connections="100" username="user"
        url="jdbc:oracle:thin:@XXXXXXX.domain:1521:orcl" name="username"
         password="password" connection-retry-interval="1">
        <description>prod data source</description>
</data-source>

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms