Issue in using PreparedStatement for update query with column name "REORDER"

65 views Asked by At

We have been using Ojdbc 14 with hibernate 3x to connect to Oracle database in our application which was deployed in JBoss 4x. Now we have upgraded our application server to JBoss 6x. So we had to upgrade hibernate(4.2.18) and Ojdbc drivers(ojdb7) to be in compatible with the application server.

We are now facing an issue(invalid Column index) with an update operation on a table having a column with name "REORDER", which was woring fine with Hibernate 3x and Ojdbc 14.

The PreparedStatement is calculating incorrect parameter count(276) instead of the actual number of parameters(277) when the column REORDER is present in the query else it is working fine.

Also the insert statement with column "REORDER" is working fine.

We tried searching the Oracle keywords to see whether this is an Oracle keyword or not, but it is not listed in the Oracle Reserved keywords as well.

We are able to update the table when we name the column "REORDER" to some other name.

Can anyone please help us understanding what went wrong here.

1

There are 1 answers

0
Angappan Ganesan On

It seems to be an issue with some specific versions of JDBC drivers. We are able to resolve the issue by downgrading the JDBC driver used in our environment to OJDBC6(11.2.0.3).

Reference: http://www-01.ibm.com/support/docview.wss?uid=swg21982951