2 Replies Latest reply on Oct 18, 2001 4:55 AM by lairdchris

    Prepared Statements

    khenneuse

      Environment:
      Red Hat 7.0
      JBoss 2.4.1a
      Tomcat 3.2.3
      JDK 1.3.0_03
      Cloudscape 3.6

      Problem:
      When I try to create a PreparedStatement in my code
      I get the following exception:
      ------------- Begin Exception -----------------------
      [EntitySynchronizationInterceptor] Store failed
      java.rmi.RemoteException: Unable to create PreparedStatement!; nested exception is:
      java.sql.SQLException: Unable to create PreparedStatement!
      java.sql.SQLException: Unable to create PreparedStatement!
      at org.jboss.pool.jdbc.xa.wrapper.XAClientConnection.prepareStatement(XAClientConnection.java:169)
      .
      .
      .
      ------------- End Exception -------------------------

      What I find is that I am able to connect to Cloudscape
      (Running in process not RMI) for regular queries but
      I am not able to create a PreparedStatement. I know
      Cloudscape is less then ideal but it is what I currently have until I can rework for another DB.

      Is there something extra I must do in the configuration
      to have PreparedStatements work?

      Thanks,

      -Kent

        • 1. Re: Prepared Statements
          hstech

          Hi Kent,

          I had a similar problem with Interbase. My problem was because of a misformed SQL statement. Can you post your SQL statement, code snippets, and the table meta data.

          Cheers,
          Aaron.

          • 2. Re: Prepared Statements
            lairdchris

            I have the same problem after accessing a field of a container managed entity bean.

            I'm using Jboss with an Informix database.

            Has anybody an idea?

            Here's the log output:
            JAWS - findByZahl command executing: SELECT id FROM Christian WHERE zahl=?
            JAWS - Set parameter: idx=1, jdbcType=INTEGER, value=4711
            Christian - Activated bean Christian with id = 1
            JAWS - Load command executing: SELECT datum,name,zahl,kleinezahl,id FROM Christian WHERE id=?
            JAWS - Set parameter: idx=1, jdbcType=INTEGER, value=1
            JAWS - Store command executing: UPDATE Christian SET datum=?,name=?,zahl=?,kleinezahl=?,id=? WHERE id=?
            JAWS - java.sql.SQLException: Unable to create PreparedStatement!
            JAWS - at java.sql.SQLException.(SQLException.java:84)
            JAWS - at org.opentools.minerva.jdbc.xa.wrapper.XAClientConnection.prepareStatement(XAClientConnection.java:169)
            JAWS - at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:158)
            ...