It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes JDBC connection error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC connection error" Watch "JDBC connection error" New topic

JDBC connection error

priya Anand

Joined: Mar 30, 2009
Posts: 20

Please help me resolve the following error:

RAR7093 : Error while cleaning up ManagedConnection
javax.resource.ResourceException: This Managed Connection is not valid as the phyiscal connection is not usable
at com.sun.gjc.spi.ManagedConnection.checkIfValid(
at com.sun.gjc.spi.ManagedConnection.cleanup(

My configuration is as follows :

<jdbc-connection-pool connection-validation-method="table" datasource-classname="oracle.jdbc.pool.OracleConnectionPoolDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="true" is-isolation-level-guaranteed="false" max-pool-size="32" max-wait-time-in-millis="60000" name="ddamd" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" steady-pool-size="8" validation-table-name="HOST">
<property name="URL" value="jdbcracle:thin:@server:1521/thingy" />
<property name="Password" value="password" />
<property name="User" value="user" />

Thanks and Regards,
Priya Anand

[edit to remove connection details]
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403

Could you try setting the fail-all-connections flag to true? This might be needed in case of a database restart.

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
John Kimball
Ranch Hand

Joined: Apr 13, 2009
Posts: 96
Even if it's a development box, it's REALLY bad idea to:
- Include the URL.
- Include the password.
- Include the username.
Moojid Hamid
Ranch Hand

Joined: Mar 07, 2009
Posts: 120
double check your URL
krishna kanaga

Joined: Nov 26, 2009
Posts: 3
Have you included the Oracle JDBC Jar in your build path? Given the "package oracle.jdbc does not exist" error, it seems you don't have the Oracle Jar in your path.

The link below is one that I use for simple Java examples. If you search for "jdbc" on that, it redirects to the ExampleDepot site link I included below.
Java Almanac
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
<property name="URL" value="jdbcracle:thin:@server:1521/thingy" />

missing "o" between "c" and "r"
I agree. Here's the link:
subject: JDBC connection error
It's not a secret anymore!