• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQLException encountered while executing the query - however, at random situations

 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 getting
  • the part of your code that is causing the problem

  • Good Luck,
    Avi.
     
    Rashmi Tambe
    Ranch Hand
    Posts: 418
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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.
     
    Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic