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: executeQuery(String x) throws ArrayIndexOutOfBoundsException

JDBC: executeQuery(String x) throws ArrayIndexOutOfBoundsException

From: Gerhard Wanner <Gerhard.Wanner_at_ifs-gmbh.de>
Date: Mon, 07 Jun 1999 14:46:57 +0200
Message-ID: <375BBF41.58205FFF@ifs-gmbh.de>


We are reusing java.sql.Statement-Objects. When a query returns no result-records (empty ResultSet), it seems that some information in the statement of a previous executed statement is used, so that an exception (see below) is thrown.

java.lang.ArrayIndexOutOfBoundsException

        at
oracle.jdbc.driver.OracleStatement.doDefinesFromTypes(Compiled Code)

        at
oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:997)

        at
oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1152)

        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1187)

        at
oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:194)

        at
cheops.pos.ds.DatabaseCursorJdbc.open(DatabaseCursorJdbc.java:183)

When we open a statement for each query the problem will not occur (but the performance sinks).

We are using the Oracle type 2 JDBC-Driver (via the OCI Client) Version 8.0.5.0.0. The problem also occurs with the type 4 driver (Oracle Thin).

Is there a better solution?

Gerhard
-
Dr. Gerhard Wanner

	mailto:gwanner_at_ibl.de
	Tel: 0172 711 7467
IBL Ingenieurbuero Letters GmbH
	mailto:info_at_ibl.de
	http://www.ibl.de

	Tel: 0711 90374 111
	Fax: 0711 90374 199
Received on Mon Jun 07 1999 - 07:46:57 CDT

Original text of this message

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