Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Exception

 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

What does this exception actually mean?

Exception : java.sql.SQLException: Io exception: Got minus one from a read call

Thanks in advance,
Visu Nekk
 
S J Martin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, probably JDBC driver specific.

Is there no driver generated error code further down the stack trace ?

I /think/ I've had such a response when there was no data available (but not because of an empty result set).

Thus, I suspect a programming/configuration error (as opposed to an SQL error).

Check that you've a valid connection, that the statement is correctly setup and that you're executing the statement correctly.

If you can't see anything wrong, take a few steps back - simplify things (e.g. remove any bind variables) and get that working. Then re-introduce one thing at a time.
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Martin,

Previously i used classes12.jar to connect to Oracle 10g. We have batch inserts in the application and so we used to run into java.lang.OutOfMemoryException and SQLException with err code 12519. Hence, I changed the driver to ojdbc14_g.jar and the previous exceptions were gone when i ran it on Windows. When I did the same on Linux, I am getting this particular exception. Please suggest if this is right.

Regards,
Visu Nekk
 
S J Martin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahhh, so you've changed machines.

Have you checked that you've got DB connectivity correctly configured ?

I assume that you're using a "thin" driver ?
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Martin,

I am using a thin driver with the url

jdbcracle:thin:@hostname:1521, user, password
 
Ashok Mash
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a few things to check:

* Is the new ojdbc14_g.jar correct version for your database? Preferably take the file that is in the ...db_n/jdbc/lib folder.
* Can you connect to the db from outside the app, say from command shell using sqlplus?

Sorry, I don't have a definite answer, but it looks like a connection issue than a code/java issue.
[ August 02, 2007: Message edited by: Ashok Mash ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic