2 Replies Latest reply on Apr 24, 2002 8:02 AM by erden

    jboss-3.0.0RC1 CMP2.0 problems with create and find

    erden

      Hi,
      I am trying to deploy a cmp2.0
      I am using jboss-3.0.0RC1 with tomcat-4.0.3, jdk1.3.1_03, oracle8.
      The deployment looks that it is working fine (no exceptions or errors), because at deployment it creates the table if it doesn't exist and its not if it exists.
      But when I try to run a create method or a findByPrimarKey method I get exceptions.

      When I run create method it returns with the following exception
      Bean Message : exception: Error getting application tx data map. Embedded Exception null; nested exception is: javax.ejb.EJBException: Error getting application tx data map. Embedded Exception null
      where the log shows
      2002-04-23 10:22:33,368 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.BCBiddingBean] Create: pk=bidId2
      2002-04-23 10:22:33,368 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.BCBiddingBean] Executing SQL: SELECT COUNT(*) FROM BC_BIDDING WHERE bidId=?
      2002-04-23 10:22:33,568 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.BCBiddingBean] Executing SQL: INSERT INTO BC_BIDDING (bidId, auctionId, price) VALUES (?, ?, ?)
      2002-04-23 10:22:33,598 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.BCBiddingBean] Create: Rows affected = 1
      2002-04-23 10:22:33,608 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getApplicationTxDataMap(JDBCStoreManager.java:216)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.synchronizeRelationData(JDBCStoreManager.java:512)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:507)
      at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:458)

      Similarly,
      when I run findByPrimarKey() method even though there is data in the database(manually entered before the deployment) with the correct key it returns with the following exception
      Bean Message : exception: No such entity!
      where the log shows
      2002-04-23 09:41:03,197 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.BCBiddingBean.findByPrimaryKey] Executing SQL: SELECT bidId FROM BC_BIDDING WHERE bidId=?


      Can somebody please help.