*
The moose likes JDBC and the fly likes java.sql.SQLException: Stream has already been closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: Stream has already been closed" Watch "java.sql.SQLException: Stream has already been closed" New topic
Author

java.sql.SQLException: Stream has already been closed

Fernando Dominguez
Ranch Hand

Joined: Sep 01, 2006
Posts: 102

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

Joined: Aug 05, 2007
Posts: 294
can you provide the stack trace? does it tell you which line the exception happened?
Fernando Dominguez
Ranch Hand

Joined: Sep 01, 2006
Posts: 102

Of course,

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
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

Joined: Apr 07, 2009
Posts: 489

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..


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: Stream has already been closed
 
Similar Threads
JDBC issue with Oracle LONG datatype
Exception
Data type mismatch need to convert string to a number
Transactions Rollback in jsp
Help urgent regarding Session Bean JDBC call