1 Reply Latest reply on Oct 30, 2001 10:06 AM by Steve Norman

    CMP with SQL Server

    Steve Norman Newbie

      Hello All,
      I am setting up my first Entity bean using CMP and I am getting some error messages on my JBOSS console.

      The following is my setup:

      JBoss-2.4.1_Jetty-3.1.RC9-1
      MS SQL Server 7.00.623
      Windows NT 4.0 SP2
      JDK 1.3
      i-net Opta 2000 4.12

      By entity bean deploys and I can read the properties from a client program. When the client program reads the properties I get the following error on the console:

      Default] JBoss 2.4.1 Started in 0m:21s
      [ContactProfile] XAException: tx=XidImpl [FormatId=257, GlobalId=norman-nt//0, Br
      anchQual=] errorCode=XA_UNKNOWN(0)
      [ContactProfile] javax.transaction.xa.XAException: [WEBSQL]Transaction count aft
      er EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing.
      Previous count = 0, current count = 2.
      [ContactProfile] at com.inet.tds.k.if(Unknown Source)
      [ContactProfile] at com.inet.tds.k.start(Unknown Source)
      [ContactProfile] at org.jboss.tm.TxCapsule.startResource(TxCapsule.java:1
      087)
      [ContactProfile] at org.jboss.tm.TxCapsule.enlistResource(TxCapsule.java:
      614)
      [ContactProfile] at org.jboss.tm.TransactionImpl.enlistResource(Transacti
      onImpl.java:111)
      [ContactProfile] at org.jboss.pool.jdbc.xa.XAConnectionFactory.prepareObj
      ect(XAConnectionFactory.java:290)
      [ContactProfile] at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:5
      66)
      [ContactProfile] at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:5
      38)
      [ContactProfile] at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection
      (XAPoolDataSource.java:178)
      [ContactProfile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getConnec
      tion(JDBCCommand.java:680)
      [ContactProfile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecu
      te(JDBCCommand.java:152)
      [ContactProfile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCBeanExistsCommand
      .execute(JDBCBeanExistsCommand.java:46)
      [ContactProfile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand
      .findByPrimaryKey(JDBCFindEntityCommand.java:84)
      [ContactProfile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand
      .execute(JDBCFindEntityCommand.java:59)
      [ContactProfile] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.fin
      dEntity(JAWSPersistenceManager.java:136)
      [ContactProfile] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntit
      y(CMPPersistenceManager.java:294)
      [ContactProfile] at org.jboss.ejb.EntityContainer.find(EntityContainer.ja
      va:594)
      [ContactProfile] at java.lang.reflect.Method.invoke(Native Method)
      [ContactProfile] at org.jboss.ejb.EntityContainer$ContainerInterceptor.in
      vokeHome(EntityContainer.java:843)
      [ContactProfile] at org.jboss.ejb.plugins.EntitySynchronizationIntercepto
      r.invokeHome(EntitySynchronizationInterceptor.java:231)
      [ContactProfile] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invok
      eHome(EntityInstanceInterceptor.java:154)
      [ContactProfile] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHom
      e(EntityLockInterceptor.java:108)
      [ContactProfile] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxI
      nterceptorCMT.java:135)
      [ContactProfile] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransac
      tions(TxInterceptorCMT.java:307)
      [ContactProfile] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxI
      nterceptorCMT.java:86)
      [ContactProfile] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(
      SecurityInterceptor.java:103)
      [ContactProfile] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogIn
      terceptor.java:106)
      [ContactProfile] at org.jboss.ejb.EntityContainer.invokeHome(EntityContai
      ner.java:420)
      [ContactProfile] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoke
      r.invokeHome(JRMPContainerInvoker.java:370)
      [ContactProfile] at java.lang.reflect.Method.invoke(Native Method)
      [ContactProfile] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServe
      rRef.java:241)
      [ContactProfile] at sun.rmi.transport.Transport$1.run(Transport.java:142)

      [ContactProfile] at java.security.AccessController.doPrivileged(Native Me
      thod)
      [ContactProfile] at sun.rmi.transport.Transport.serviceCall(Transport.jav
      a:139)
      [ContactProfile] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCP
      Transport.java:443)
      [ContactProfile] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.
      run(TCPTransport.java:643)
      [ContactProfile] at java.lang.Thread.run(Thread.java:484)


      The attached is how I setup my database pool:


      com.inet.tds.XDataSource
      SQLServerPoolSecurity
      host=000.000.229.7; database=security
      xxxx
      xxx
      10
      false
      false
      false
      true
      120000
      1800000
      false
      false
      1.0
      0



      When I use a set method the database is not updated.

      Any ideas?

      Thanks in advance,

      S. Norman