File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes SQL Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL Exceptions" Watch "SQL Exceptions" New topic

SQL Exceptions

Sanjeev Kaushik
Ranch Hand

Joined: Aug 01, 2002
Posts: 105
My application is running in Websphere 5 and DB is Oracle 9.2.04. I am seeing following exceptions very irregularly.
java.sql.SQLException: Refcursor value is invalid
[4/2/04 13:10:07:609 CST] 6eda6eda StaleConnecti A CONM7007I: Mapping the following SQLException, with ErrorCode 17,002 and SQLState <null>, to a StaleConnectionException: java.sql.SQLException: Io exception: Protocol violation
java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
Occurance of these exceptions are very random. For same resultset it may appear or may not.
Could someone please tell me if this DB problem or JDBC problem(Java)?

Sanjeev Kaushik
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

The key here is that it is a stale connection exception. It is happening intermittently on the first access after a while. You can fix this, by trying again (manually or pragmatically) when it happens. The second attempt will usually go through.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: SQL Exceptions
jQuery in Action, 3rd edition