aspose file tools*
The moose likes JDBC 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC connection error" Watch "JDBC connection error" New topic
Author

JDBC connection error

priya Anand
Greenhorn

Joined: Mar 30, 2009
Posts: 20
Hi,

Please help me resolve the following error:

[#|2009-01-19T18:40:58.454-0300|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=32;_ThreadName=httpSSLWorkerThread-8080-41;_RequestID=82b30543-b1b4-4347-886d-62d205190cb3;|
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(ManagedConnection.java:627)
at com.sun.gjc.spi.ManagedConnection.cleanup(ManagedConnection.java:233)

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" />
</jdbc-connection-pool>

Thanks and Regards,
Priya Anand

[edit to remove connection details]
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

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


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"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
Greenhorn

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.
Source(s):
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: http://aspose.com/file-tools
 
subject: JDBC connection error
 
Similar Threads
just firt web service is working
JDBC connection error
Error in allocating a connection. Cause: sun.jdbc.odbc.JdbcOdbcDriver cannot be cast to javax.sql.Da
Connecting jsp with derby
[JPA 2.0] Redoploying app deletes my database?