File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes SQL Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL Exceptions" Watch "SQL Exceptions" New topic
Author

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)?
Thanks,


Sanjeev Kaushik
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

Sanjeev,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL Exceptions