Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Closed Connection Issues

JoranJan 17 2012 — edited Jan 24 2012
We're having some issues with closed connection errors. Basically, if a user is idle long enough, if he clicks a button, then the results won't show and a closed connection error will be thrown. Frequently the user will have to re-enter information or it leads to some bad results. These tend to happen with views in particular.

So, any ideas? I'm new to JDeveloper and Oracle, so I'm not quite sure where to start or information I should provide. Our pages are running off of one virtual machine with the Oracle database on another virtual machine, both on the same physical machine.

A couple questions:

1) Does this have anything to do with Session timeout? We have ours set to 60 minutes. When I set it to 1 minute, it'll redirect to the login page at 1 minute. Odd... I just tested by idling on a page for 90 minutes, no redirect, no error thrown...
2) We have validate-connection set to true, but do not have validate-connection-query set. Is there a default value or will this stop the verification?

Thank you very much.

Here's our datasource information:

<data-sources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd" xmlns="http://xmlns.oracle.com/oracleas/schema">
<connection-pool name="jdev-connection-pool-DBSVR" disable-server-connection-pooling="false" validate-connection="true" abandoned-connection-timeout="60">
<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="user" password="" url="jdbc:oracle:thin:@192.168.130.23:1521:web"/>
</connection-pool>
<managed-data-source name="jdev-connection-managed-DBSVR" jndi-name="jdbc/DBSVRDS" connection-pool-name="jdev-connection-pool-DBSVR"/>
<native-data-source name="jdev-connection-native-STRATDBSVR" jndi-name="jdbc/STRATDBSVRCoreDS" url="jdbc:oracle:thin:@192.168.130.23:1521:web" user="user" password="" data-source-class="oracle.jdbc.pool.OracleDataSource"/>
</data-sources>

Session timeout:

<session-config>
<session-timeout>60</session-timeout>
</session-config>

Here's an example of the error:

INFO: Fatal error code : '17,008' detected handling SQLException : 'java.sql.SQLException: Closed Connection'.
12/01/09 14:40:27 java.lang.NullPointerException
12/01/09 14:40:27 at oracle.oc4j.sql.proxy.StatementBCELProxy.oc4j_releaseToCache(StatementBCELProxy.java:67)
12/01/09 14:40:27 at oracle.oc4j.sql.proxy.StatementBCELProxy.oc4j_releaseTarget(StatementBCELProxy.java:79)
12/01/09 14:40:27 at oracle.oc4j.sql.proxy.SQLBCELProxy.oc4j_close(SQLBCELProxy.java:95)
12/01/09 14:40:27 at oracle.oc4j.sql.proxy.StatementBCELProxy.close(StatementBCELProxy.java:92)
12/01/09 14:40:27 at oracle.jbo.server.DBTransactionImpl.closeStatement(DBTransactionImpl.java:4202)
12/01/09 14:40:27 at oracle.jbo.server.ViewObjectImpl.closeFreedStatements(ViewObjectImpl.java:8466)
12/01/09 14:40:27 at oracle.jbo.server.ViewObjectImpl.closeStatements(ViewObjectImpl.java:8451)
12/01/09 14:40:27 at oracle.jbo.server.DBTransactionImpl.closeStatements(DBTransactionImpl.java:4370)
12/01/09 14:40:27 at oracle.jbo.server.DBTransactionImpl.closeTransaction(DBTransactionImpl.java:1542)
12/01/09 14:40:27 at oracle.jbo.server.DBTransactionImpl.disconnect(DBTransactionImpl.java:4730)
12/01/09 14:40:27 at oracle.jbo.server.DBTransactionImpl2.disconnect(DBTransactionImpl2.java:310)
12/01/09 14:40:27 at oracle.jbo.server.DBTransactionImpl2.reconnect(DBTransactionImpl2.java:329)
12/01/09 14:40:27 at oracle.jbo.common.ampool.DefaultConnectionStrategy.reconnect(DefaultConnectionStrategy.java:239)
12/01/09 14:40:27 at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolReconnect(ApplicationPoolMessageHandler.java:487)
12/01/09 14:40:27 at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:323)
12/01/09 14:40:27 at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7777)
12/01/09 14:40:27 at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4074)
12/01/09 14:40:27 at oracle.jbo.common.ampool.ApplicationPoolImpl.manageReferencingState(ApplicationPoolImpl.java:1239)
12/01/09 14:40:27 at oracle.jbo.common.ampool.ApplicationPoolImpl.finalizeResource(ApplicationPoolImpl.java:1156)
12/01/09 14:40:27 at oracle.jbo.pool.ResourcePool.removeResourceInternal(ResourcePool.java:749)
12/01/09 14:40:27 at oracle.jbo.pool.ResourcePool.setState(ResourcePool.java:1004)
12/01/09 14:40:27 at oracle.jbo.pool.ResourcePool.gc(ResourcePool.java:1423)
12/01/09 14:40:27 at oracle.jbo.pool.ResourcePool.wakeup(ResourcePool.java:774)
12/01/09 14:40:27 at oracle.jbo.pool.ResourcePool.wakeup(ResourcePool.java:779)
12/01/09 14:40:27 at oracle.jbo.pool.ResourcePoolMonitor.run(ResourcePoolMonitor.java:98)
12/01/09 14:40:27 at java.util.TimerThread.mainLoop(Timer.java:512)
12/01/09 14:40:27 at java.util.TimerThread.run(Timer.java:462)
Exception breakpoint occurred at line 311 of ReleasableResourcePooledExecutor.java.
java.lang.UnsupportedOperationException:

Edited by: 908629 on Jan 17, 2012 2:18 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2012
Added on Jan 17 2012
10 comments
5,919 views