2 Replies Latest reply on May 3, 2005 8:25 AM by fred

    New

    fred Newbie

      Hello everybody,

      This is my first post and I'm afraid my problem is not trivial.

      I've got an application with session and cmp entity beans. It's running fine on JBoss 3.2.2
      But I've got an exception in rare but reproductible cases on JBoss 4.0.1sp1:


      12:48:16,056 DEBUG [EjbEcSituations] Executing SQL: UPDATE SITUATIONS SET TSTAMP=?, NUM_INTERNE_TITULAIRE=?, NUMERO_DE_VERSION_TITULAIRE=?, CODE_STATUT=?, IDENTIFIANT_LIEU_DE_TRAVAIL=?, TYPE_STRUCTURE=?, VERSION_CARTE=?, NUMERO_DE_CARTE=? WHERE NUM_INTERNE_SITUATION=? AND TSTAMP=?
      12:48:16,081 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract metier.pk.DemandePK metier.session.EjbSnIncident.declarerIncident(metier.datatransferobject.Incident) throws util.exceptions.SergeMetierException,java.rmi.RemoteException, causedBy:
      org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serge-dev/38, BranchQual=, localId=38] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0, id=2002617265)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:344)
      at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      at org.jboss.ejb.Container.invoke(Container.java:870)
      at sun.reflect.GeneratedMethodAccessor331.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
      at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:115)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:101)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
      at $Proxy285.declarerIncident(Unknown Source)
      at metier.businessDelegate.IncidentDelegate.declarerIncident(IncidentDelegate.java:128)
      at services.client.ServicesMetierSerge.declarationIncident(ServicesMetierSerge.java:192)
      at web.actions.ValidationDeclarationAction.effectuerDeclIncidents(ValidationDeclarationAction.java:323)
      at web.actions.ValidationDeclarationAction.executeAction(ValidationDeclarationAction.java:264)
      at web.actions.IncidentsActionGenerique.executeAction(IncidentsActionGenerique.java:128)
      at framework.web.actions.ActionGenerique.execute(ActionGenerique.java:231)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:150)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0, id=2002617265
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:155)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:651)
      at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:413)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:390)
      at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:743)
      at org.jboss.ejb.GlobalTxEntityMap$2.synchronize(GlobalTxEntityMap.java:134)
      at org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization.synchronize(GlobalTxEntityMap.java:253)
      at org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization.beforeCompletion(GlobalTxEntityMap.java:302)
      at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1383)
      at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1075)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:296)


      I've traced the sql commands and I've seen this:

      In JBoss 3.2.2, the sql command that causes the problem in 4.0 is executed during the transaction (at the normal time, when the entity bean is updated).
      In jboss 4.0, this request is executed at the end of the transaction, at commit time.

      I've changed nothing in my Ejb jar deployed (concerning commit semantics or anything else).
      The request causing problems is included ina one-to-many relation ship and its concurrency is managed optimistically through a timestamp column.

      Does anyone have any idea?

      Many thanks in advance,

      Fred

        • 1. Re: New
          Roger Newbie

          Hi,

          If I understand correctly your error may be occuring in compiled JSP files. Further, I understand that 4.0 is using a later version of the Servlet specification than 3.2.2. Your error may be due to features no longer supported in this latter version of the servlet spec. Alternatively, the latter version may have more stringent error checking, for example it may check for custom tags embedded in comments.

          Hope this is of some help.

          Roger

          • 2. Re: New
            fred Newbie

            Hi Roger,

            Thanks for your response.
            But I'm afraid my problem is not related to servlet specifications.
            In fact, the discussion is going on this post:
            http://www.jboss.org/index.html?module=bb&op=viewtopic&t=63326
            An the problem is related to date mapping problem and triggers...

            thanks again,

            fred