0 Replies Latest reply on Apr 3, 2002 12:49 PM by Ron Jawanda

    SQL 7 transactions and CPM

    Ron Jawanda Novice

      This is my first time with SQL 7 and EJB CPM.
      I have a finder method that tries to locate a record in a database.
      This is my EJB and the Exception
      I don't know what I get the exception??
      I hope someone can help me. I need to be able to read data. I inserted data... but can't read.
      :(

      Error is:
      Error creating prepared statement.
      Any idea how to debug it?


      <ejb-jar>
      <display-name>Pubs</display-name>
      <enterprise-beans>


      Models a Pubs
      <ejb-name>PubsBean</ejb-name>
      ca.husky.pubs.PubsHome
      ca.husky.pubs.Pubs
      <ejb-class>ca.husky.pubs.PubsBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-field><field-name>authorId</field-name></cmp-field>
      <cmp-field><field-name>firstName</field-name></cmp-field>
      <cmp-field><field-name>lastName</field-name></cmp-field>
      <primkey-field>authorId</primkey-field>


      </enterprise-beans>

      <assembly-descriptor>
      <container-transaction>

      <ejb-name>PubsBean</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Never</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>





      [INFO,MS SQLSERVER2000] No transaction right now.
      [INFO,MS SQLSERVER2000] No transaction right now.


      [WARN,PreparedStatementFactory] Error creating prepared statement.
      java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned co
      nnection while in manual transaction mode.
      at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
      )
      at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
      at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Sour
      ce)
      at com.microsoft.jdbc.base.BaseStatement.setupImplConnection(Unknown Sou
      rce)
      at com.microsoft.jdbc.base.BaseStatement.(Unknown Source)