This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: Stream has already been closed

 
Fernando Dominguez
Ranch Hand
Posts: 104
Debian Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm using ORACLE when I execute this method I get a java.sql.SQLException: Stream has already been closed.
Could anyone take a quick look at the following code, please?



Thanks.
 
Davie Lin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you provide the stack trace? does it tell you which line the exception happened?
 
Fernando Dominguez
Ranch Hand
Posts: 104
Debian Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course,

 
Davie Lin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
at core.orm.Orm.getDetalleEncargo(Orm.java:102)

can you re post the line of code at 102 from Orm.java

 
Leonardo Carreira
Ranch Hand
Posts: 489
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

For ensure, check your SQL directly in database.. (in this case the SQL is correct)..


You could change your code for while to if, because the result is only one record, isn't it?..


try to remove this code, because i think it's useless


in that code there's try.. catch.. block, its mean the exception would be caught if happened.., so why we've to throw the exception again (in the catch block)?..

may i know the sequence's method call in your application?..

please correct me if i'm wrong..

Thanks..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic