4 Replies Latest reply on Jul 19, 2004 5:46 PM by David

    Expected one affected row: rowsAffected=0

    David Newbie

      I have a strange problem where in one transaction I have a cmp entity bean that inserts a row and in the same transaction updates that row. The update is failing with 'Expected one affected row: rowsAffected=0'

      Here is some trace level logging that shows the problem

      2004.07.16 13:51:10.921 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004.07.16 13:51:10.921 EDT DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup] Executing SQL: INSERT INTO PRODUCT_GROUP (parent_product_id, child_product_id, start_date, end_date, created_by, created_date, updated_by, updated_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
      2004.07.16 13:51:10.921 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004.07.16 13:51:10.921 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning connection org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b already associated with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=], already enlisted for ManagedConnection: org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@1cfb7fd, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_parentProductId] Set parameter: index=1, jdbcType=BIGINT, value=20124
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_childProductId] Set parameter: index=2, jdbcType=BIGINT, value=9388
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_startDate] Set parameter: index=3, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.89
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_endDate] Set parameter: index=4, jdbcType=TIMESTAMP, value=NULL
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_createdBy] Set parameter: index=5, jdbcType=BIGINT, value=1000845576
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_createdDate] Set parameter: index=6, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.89
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_updatedBy] Set parameter: index=7, jdbcType=BIGINT, value=1000845576
      2004.07.16 13:51:10.937 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_updatedDate] Set parameter: index=8, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.89
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, object: org.jboss.resource.adapter.jdbc.WrappedConnection@1cfb7fd, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=] status=STATUS_ACTIVE
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] old stack for key: ProxyTarget[org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler@1d2acaf]
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@8e96fc
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TransactionImpl] Committing, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=], status=STATUS_ACTIVE
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TransactionImpl] calling sync 0, org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronization@1ab307c
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TransactionImpl] calling sync 1, org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TxRemover@1fc5524
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TransactionImpl] calling sync 2, org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronization@139af80
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.tm.TransactionImpl] calling sync 3, org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapSynchronize@312c50
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] old stack for key: ProxyTarget[org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler@795d5f]
      2004.07.16 13:51:10.968 EDT DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.com.isopia.ilms.ejb.entityBeans.product.Product] Executing SQL: UPDATE PRODUCT SET start_date=?, created_date=?, updated_date=? WHERE product_id=?
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning connection org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b already associated with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=], already enlisted for ManagedConnection: org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@5474cf, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@ee9368
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.com.isopia.ilms.ejb.entityBeans.product.Product] connection = org.jboss.resource.adapter.jdbc.WrappedConnection@5474cf
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.product.Product#_startDate] Set parameter: index=1, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.781
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.product.Product#_createdDate] Set parameter: index=2, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.781
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.product.Product#_updatedDate] Set parameter: index=3, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.781
      2004.07.16 13:51:10.968 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.product.Product#_productId] Set parameter: index=4, jdbcType=BIGINT, value=20124
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, object: org.jboss.resource.adapter.jdbc.WrappedConnection@5474cf, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@ee9368
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004.07.16 13:51:11.031 EDT DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.com.isopia.ilms.ejb.entityBeans.product.Product] Rows affected = 1
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@ee9368
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] old stack for key: ProxyTarget[org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler@1d2acaf]
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning connection org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b already associated with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=], already enlisted for ManagedConnection: org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b
      2004.07.16 13:51:11.031 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@1f2caf4, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:11.031 EDT DEBUG [com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroupBean$Proxy] where clause: [20124, 9388, 2004-07-16 17:51:10.89]
      2004.07.16 13:51:11.046 EDT DEBUG [com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroupBean$Proxy] Failed to find matching entity
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, object: org.jboss.resource.adapter.jdbc.WrappedConnection@1f2caf4, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004.07.16 13:51:11.062 EDT DEBUG [com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroupBean$Proxy] ejbStore() isModified? false
      2004.07.16 13:51:11.062 EDT DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup] Executing SQL: UPDATE PRODUCT_GROUP SET created_date=?, updated_date=? WHERE parent_product_id=? AND child_product_id=? AND start_date=?
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning connection org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b already associated with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=]
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=], already enlisted for ManagedConnection: org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@4f349b
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@1edb870, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup] connection = org.jboss.resource.adapter.jdbc.WrappedConnection@1edb870
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_createdDate] Set parameter: index=1, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.89
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_updatedDate] Set parameter: index=2, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.89
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_parentProductId] Set parameter: index=3, jdbcType=BIGINT, value=20124
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_childProductId] Set parameter: index=4, jdbcType=BIGINT, value=9388
      2004.07.16 13:51:11.062 EDT TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP1xFieldBridge.com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroup#_startDate] Set parameter: index=5, jdbcType=TIMESTAMP, value=2004-07-16 17:51:10.89
      2004.07.16 13:51:11.093 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called
      2004.07.16 13:51:11.093 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@53033e, object: org.jboss.resource.adapter.jdbc.WrappedConnection@1edb870, key: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:11.093 EDT TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004.07.16 13:51:11.093 EDT TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: org.jboss.resource.connectionmanager.CachedConnectionManager$KeyConnectionAssociation@4c55ff
      2004.07.16 13:51:11.093 EDT TRACE [org.jboss.tm.TransactionImpl] setRollbackOnly(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=DBOON1//189, BranchQual=] status=STATUS_ACTIVE
      2004.07.16 13:51:11.093 EDT TRACE [org.jboss.tm.TransactionImpl] failed before completion
      javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=com.isopia.ilms.ejb.entityBeans.productGroup.ProductGroupPK@c914aa1f[parentProductId=20124,childProductId=9388,startDate=2004-07-16 17:51:10.89
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:156)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:627)
       at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:421)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:387)
       at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:714)
       at org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:149)
       at org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapSynchronize.beforeCompletion(GlobalTxEntityMap.java:215)
       at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1308)
       at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:347)
       at org.jboss.tm.TxManager.commit(TxManager.java:141)
       at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:126)
       at com.isopia.ilms.ui.common.UserTX.commitTX(UserTX.java:76)
       at com.isopia.ilms.ui.msi.PackageJB.processForm(PackageJB.java:945)
       at org.apache.jsp.msi.pp.package_005fcreate_jsp._jspService(package_005fcreate_jsp.java:198)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
       at com.elementk.util.RequestTimingFilter.doFilter(RequestTimingFilter.java:49)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
       at com.elementk.security.servlet.LmnkSecurityFilter.doFilter(LmnkSecurityFilter.java:110)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
       at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:509)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
       at com.elementk.util.valve.RequestCollectorValve.invoke(RequestCollectorValve.java:96)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
       at com.elementk.util.valve.RequestEncodingValve.invoke(RequestEncodingValve.java:73)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
       at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
       at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309)
       at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
       at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
       at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
       at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
       at java.lang.Thread.run(Thread.java:534)
      
      



      Another thing I did to try and determine if the record exists, after the insert but before the update, is in the ejbStore method, try to select the record that I think I'm updating, that sql doesn't find the record.


      Any help would be much appreciated.


        • 1. Re: Expected one affected row: rowsAffected=0
          Alexey Loubyansky Master

          So if the record can't be found it is the expected behaviour. Looks like someone removed it after it was created unless there is some date comparison issue.

          • 2. Re: Expected one affected row: rowsAffected=0
            David Newbie

            Take a look at the log again. This is all one transaction, I'm the only user on the system, and the primary key of the record being updated exactly matches the one that was just inserted.

            This is not new code, and worked fine under other application servers, hmm...can't possibly be jboss, could it?

            • 3. Re: Expected one affected row: rowsAffected=0
              David Newbie

              I've attributed this problem to a change in the standardjbosscmp-jdbc.xml file. The oracle9i mappings have changed the datatypes that java.sql.Timestamp map to. Under Oracle8 they mapped to DATE datatypes and under Oracle9i they map to TIMESTAMP(9) datatypes. I've modified the database to be consistent with the mapping file and that seemed to solve the problem.

              However I tried to change the mapping file, standardjbosscmp-jdbc.xml(instead of chaning the database), to use DATE for the java.sql.Timestamp mapping. Changing that file seem to have no effect.

              Should changing the standardcmp-jdbc.xml file have an effect? We'd like to avoid changing the database datatypes to TIMESTAMP(9).


              • 4. Re: Expected one affected row: rowsAffected=0
                David Newbie

                I went back to the Oracle8 datasource mapping and that fixed the problem also.