Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.exception : Failed to Convert Internal Representation

 
Ajju Chawla
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Iam facing this strange problem after a got a new set of data.
Its a SQL exception with message "Failed to convert internal representation",
now what I could make out is that some part of the data is not compatible with my web application, may be jdbc is not able to take care of that particular data. The reason I think so is that the same query is nicley running and giving me results on Oracle client.

My env is -
1. Apache Tomcat 5.5.9
2. jdk-1_5_0_04-windows-i586-p
3. commons-dbcp-1.2.1
4. commons-pool-1.2

Any help is greatly appreciated.

Thanks
-Aj
 
Brian Mozhdehi
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your result set call is trying to get a type that is not the same and not convert-able from the actual type. For example trying to get a varchar using rs.getInt().

Check out http://www.dbmotive.com/oracle_error_codes.php?errcode=17059

and then adjust your code accordingly. The stack trace of the error ought to tell you which column is the culprit and there, change rs.getWhatever to rs.get(The Correct Type)
 
Ajju Chawla
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brian,

That was the problem..I was trying to get a VARCHAR with getLong().
Thanks
-Aj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic