OpenJPA
  1. OpenJPA
  2. OPENJPA-1969

SQLServer / DataDirect SQLCode=HYT00 not handled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0, 2.1.1, 2.2.0
    • Fix Version/s: 2.1.1, 2.2.0
    • Component/s: sql
    • Labels:
      None

      Description

      When using SQLServer and DataDirect JDBC driver, HYT00 SQLCode was thrown from the DataDirect driver on client side time-out, however it is not being handled and caused the following exception to percolate to the client.

      **Exception: Caught unexpected exception from find.
      org.apache.openjpa.persistence.PersistenceException:[DataDirect][SQLServer JDBC Driver]Execution timeout expired.

      {prepstmnt 47005644 SELECT t0.version, t1.id, t1.version, t1.ENTITYALAZY_ID, t1.strData, t0.strData FROM JPA20EMEntityA t0 WITH (UPDLOCK) LEFT OUTER JOIN JPA20EMEntityC t1 WITH (UPDLOCK) ON t0.id = t1.ENTITYA_ID WHERE t0.id = ? [params=?]} [code=0, state=HYT00]
      FailedObject: 1 [org.apache.openjpa.util.IntId] [java.lang.String]
      at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4869)
      at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4829)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:86)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:338)
      at com.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.initialize(WsJpaJDBCStoreManager.java:149)
      at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112)
      at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
      at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1026)
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:984)
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:901)
      at com.ibm.ws.persistence.kernel.WsJpaBrokerImpl.find(WsJpaBrokerImpl.java:212)
      at org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java:231)
      at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:502)
      at suite.r80.base.jpaspec.entitymanager.testlogic.FindLockTestLogic.testScenarioL009(FindLockTestLogic.java:2161)
      .....

      Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: [DataDirect][SQLServer JDBC Driver]Execution timeout expired. {prepstmnt 47005644 SELECT t0.version, t1.id, t1.version, t1.ENTITYALAZY_ID, t1.strData, t0.strData FROM JPA20EMEntityA t0 WITH (UPDLOCK) LEFT OUTER JOIN JPA20EMEntityC t1 WITH (UPDLOCK) ON t0.id = t1.ENTITYA_ID WHERE t0.id = ? [params=?]}

      [code=0, state=HYT00]
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:265)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:72)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1183)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1785)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
      at org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
      at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
      at com.ibm.ws.persistence.jdbc.sql.SelectImpl.execute(SelectImpl.java:89)
      at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:382)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getInitializeStateResult(JDBCStoreManager.java:576)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:378)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:333)
      ... 42 more
      NestedThrowables:
      java.sql.SQLTimeoutException: [DataDirect][SQLServer JDBC Driver]Execution timeout expired.
      at com.ddtek.jdbc.sqlserverbase.ddb7.b(Unknown Source)
      at com.ddtek.jdbc.sqlserverbase.ddb7.a(Unknown Source)
      at com.ddtek.jdbc.sqlserverbase.ddb6.b(Unknown Source)
      at com.ddtek.jdbc.sqlserverbase.ddb6.a(Unknown Source)
      at com.ddtek.jdbc.sqlserverbase.ddei.a(Unknown Source)
      at com.ddtek.jdbc.sqlserverbase.ddei.u(Unknown Source)
      at com.ddtek.jdbc.sqlserverbase.dddb.executeQuery(Unknown Source)
      at com.ddtek.jdbcx.sqlserverbase.ddm.executeQuery(Unknown Source)
      at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java:1129)
      at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:731)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:286)
      at org.apache.openjpa.lib.jdbc.JDBCEventConnectionDecorator$EventPreparedStatement.executeQuery(JDBCEventConnectionDecorator.java:270)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1181)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1785)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
      at org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
      at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
      at com.ibm.ws.persistence.jdbc.sql.SelectImpl.execute(SelectImpl.java:89)
      at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:382)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getInitializeStateResult(JDBCStoreManager.java:576)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:378)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:333)
      at com.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.initialize(WsJpaJDBCStoreManager.java:149)
      at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112)
      at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
      at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1026)
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:984)
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:901)
      at com.ibm.ws.persistence.kernel.WsJpaBrokerImpl.find(WsJpaBrokerImpl.java:212)
      at org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java:231)
      at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:502)
      at suite.r80.base.jpaspec.entitymanager.testlogic.FindLockTestLogic.testScenarioL009(FindLockTestLogic.java:2161)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Albert Lee
            Reporter:
            Albert Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development