Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> JDBC problem with Oracle 8.1.7

JDBC problem with Oracle 8.1.7

From: Michal Rutkowski <mr189200_at_zodiac.mimuw.eduXXX.pl>
Date: Mon, 18 Aug 2003 10:14:52 +0000 (UTC)
Message-ID: <slrnbk19oq.qfn.mr189200@zodiac.mimuw.edu.pl>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US