Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bigger type length than Maximum with OracleType.CURSOR

 
jiangang lan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm getting one SQLException When I execute one query which try to open one oracle cursor.

My jdk version is 1.4.2_08 and oracle version is 10g Enterprise Edition Release 10.1.0.4.0. And I use ojdbc14_g.jar and orai18n in CLASSPATH.

My code and my table is very simple:


And there is only one row in the table.And I can get all the results by one single sql "select * from hello".

The trace:



Any idea ,is it a driver problem or something i need to do?
Thanks.
 
jiangang lan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, I have tried the example of RefcursorSample offered by oraclesource
I got the same exception too. So I think it is a driver problem. But I don't known how to fix it.
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jiangang lan:
My jdk version is 1.4.2_08 and oracle version is 10g Enterprise Edition Release 10.1.0.4.0. And I use ojdbc14_g.jar and orai18n in CLASSPATH.
Any idea ,is it a driver problem or something i need to do?
Thanks.


I don't know, but you can certainly try the latest driver; it's cross-compatible with the older database that you are using.

You can download it from here:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic