| Author |
SQLException encountered while executing the query - however, at random situations
|
Rashmi Tambe
Ranch Hand
Joined: Aug 07, 2001
Posts: 418
|
|
Hi all, I have an session bean that executes various search quesries for different search criteian. The problems i get following SQL exception while executing the query on a preparedtstatement. java.sql.SQLException: ORA-01475: must reparse cursor to change bind variable datatype However, this behavior is random, and so i am not able to understand why it is occuring? I am using weblogic 7.0.1 and oracle 8.1. Can anybody help ? [ March 30, 2004: Message edited by: Rashmi Tambe ]
|
 |
Avi Abrami
Ranch Hand
Joined: Oct 11, 2000
Posts: 1112
|
|
Rashmi,
Can anybody help ?
No, not without more information. But I will make a guess. You are invoking the "setObject()" method (of interface PreparedStatement) many times. Usually, you are supplying the same type of object (for example, Timestamp), but sometimes you are sending a different type of object -- perhaps Date instead of "Timestamp". Hopefully you can figure out how to proceed from here, or supply some more details. At least: the entire error message and stack trace you are gettingthe part of your code that is causing the problem Good Luck, Avi.
|
 |
Rashmi Tambe
Ranch Hand
Joined: Aug 07, 2001
Posts: 418
|
|
Hi Avi, Here is the stack trace...
ava.sql.SQLException: ORA-01475: must reparse cursor to change bind variable datatype at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:259) at weblogic.jdbc.oci.Statement.executeQuery(Statement.java:907) at weblogic.jdbc.pool.PreparedStatement.executeQuery(PreparedStatement.java:53) at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:65) at weblogic.jdbc.rmi.SerialPreparedStatement.executeQuery(SerialPreparedStatement.java:43)
Avi, u r right...I am invoking the "setObject()" method (of interface PreparedStatement) many times. here goes the code that is causing this problem Howvere, the query does not contain date or timestamp data type parameters. They are simple string , booleans and integers. I read it somewhere that this is a bug in the WebLogic jDriver for Oracle . I am still verifying it.
|
 |
 |
|
|
subject: SQLException encountered while executing the query - however, at random situations
|
|
|