• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQL Exception

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Martin,

I am using a thin driver with the url

jdbc:oracle:thin:@hostname:1521, user, password
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Do you want ants? Because that's how you get ants. And a tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic