| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> JDBC problem with Oracle 8.1.7
The whole thing is running on JBOSS 2.4.10 (Linux machine) , i'm conected to
a Oracle 8.1.7 Server on a Windows Server.
The connection is ok. Other queries and stuff work ok.
the code looks like this :
String query = "SELECT smthing FROM some_table WHERE id = ?";
PreparedStatement ps = conn.PrepareStatement(query);
ps.setString(1, id.toString());
ps.executeQuery();
the last line throws the folowing exception :
java.sql.SQLException: Closed statement
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:49
35)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:382)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
dStatement.java:339)
at org.jboss.pool.jdbc.PreparedStatementInPool.executeQuery(PreparedStat
ementInPool.java:71)
the query has corect syntax, because i tested it on the Oracle console. I have no idea what might be wrong. I dont close the statment, the connection is ok. please help.
michal
-- GG : #2814355 e-mail : mailto:snoopy38_at_wp.pl fotoWWW : http://foto.natolin.net bikeWWW : http://rowery.natolin.net (under construction)Received on Mon Aug 18 2003 - 05:14:52 CDT
![]() |
![]() |