5 Replies Latest reply on May 8, 2003 1:21 PM by Magnus

    mysql contraint causes container runtime exception on ejbcre

    jbossed Newbie

      I'm getting a Runtime exception from the container when ejbcreate runs and violates a mysql constraint on the corresponding table (jboss 3.04):

      sql table contraint in create script is:

      constraint const1 unique(article_name, merchant_code)

      when I call create on the corresponding ejb with data that violates this I get a container runtime exception that I can't catch. Stack trace looks like:

      -------------------
      10:04:28,586 ERROR [org.jboss.ejb.GlobalTxEntityMap] Store failed on entity: 20
      javax.ejb.EJBException: Store failed; CausedByException is:
      Invalid argument value: Duplicate entry 'fudge-tb' for key 3
      ---------------------

      however the first exception which apparently comes out is a runtime exception. Has anyone come across this?? What is the best way around this? Thanks!

        • 1. Re: mysql contraint causes container runtime exception on ej
          jbossed Newbie

          To answer my own question: On a hint from a Jonas forum I made the transactional attributes of the CMP bean's ejbcreate and ejbpostcreate methods "Supports" instead of "Required" and I was able to just catch the EJBException and parse it:

          /**
          * Transactional attribute Supports somehow allows us to get mysql table constraints out as EJBExceptions
          * When it was "Required" we were getting weird container exceptions
          * @ejb.create-method view-type="local"
          * @ejb.transaction type="Supports"
          */
          public Integer ejbCreate(Article theArticle, MerchantCMPLocal theMerchant)
          throws CreateException
          {

          ...

          The client code is as follows:

          try {
          ArticleCMPLocal article = getArticleCMPLocalHome().create(theArticle, merchant);
          }
          catch (CreateException ce) { //article exists
          if (ce.getMessage().indexOf("key 1") > 0) {
          throw new DuplicateArticleException(theArticle.getCode() + " " + theArticle.getName());
          }
          if (ce.getMessage().indexOf("key 2") > 0) {
          throw new CodeTakenException(theArticle.getCode());
          }
          if (ce.getMessage().indexOf("key 3") > 0) {
          throw new DuplicateMerchantArticleException(theArticle.getName() + theArticle.getMerchantCode());
          }
          if (ce.getMessage().indexOf("key 4") > 0) {
          throw new DuplicateExternalRefArticleException(theArticle.getName() + theArticle.getExternalRef());
          }
          log.error("add Article" , ce);
          throw new TechnicalException(ce.getMessage());
          }


          This works...

          does anyone have any insight into why transaction attributes for ejbcreate behave this way in jboss??

          • 2. Re: mysql contraint causes container runtime exception on ej
            jbossed Newbie

            i take that back, that is NOT the fix... it has to do with setting the CMR in postcreate. this is what is tripping the db constraint and having jboss freak out with uncatchable exception. Any clues? Here's the big stack trace:

            11:12:39,329 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.ArticleCMP] Executing SQL: UPDATE ARTICLES SET merchant_co
            de=? WHERE id=?
            11:12:39,339 ERROR [org.jboss.ejb.GlobalTxEntityMap] Store failed on entity: 37
            javax.ejb.EJBException: Store failed; CausedByException is:
            Invalid argument value, message from server: "Duplicate entry 'fudge-tb' for key 3"
            at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:94)
            at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:589)
            at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:458)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:388)
            at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:708)
            at org.jboss.ejb.GlobalTxEntityMap.syncEntities(GlobalTxEntityMap.java:99)
            at org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapCleanup.beforeCompletion(GlobalTxEntityMap.java:168)
            at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1394)
            at org.jboss.tm.TxCapsule.commit(TxCapsule.java:364)
            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:201)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
            at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
            at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
            at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
            at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
            at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
            at $Proxy212.create(Unknown Source)
            at nl.digipay.merch.inventory.InventoryBean.addArticle(InventoryBean.java:86)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
            at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
            at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
            at org.jboss.ejb.Container.invoke(Container.java:712)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
            at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
            at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
            at $Proxy220.addArticle(Unknown Source)
            at nl.digipay.merch.web.article.SaveAddArticleAction.secureExecute(SaveAddArticleAction.java:85)
            at nl.digipay.merch.web.common.SecureMerchantAction.execute(SecureMerchantAction.java:48)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
            at java.lang.Thread.run(Thread.java:484)
            java.sql.SQLException: Invalid argument value, message from server: "Duplicate entry 'fudge-tb' for key 3"
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1628)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:1809)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1602)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1488)
            at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeUpdate(LocalPreparedStatement.java:308)
            at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:90)
            at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:589)
            at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:458)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:388)
            at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:708)
            at org.jboss.ejb.GlobalTxEntityMap.syncEntities(GlobalTxEntityMap.java:99)
            at org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapCleanup.beforeCompletion(GlobalTxEntityMap.java:168)
            at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1394)
            at org.jboss.tm.TxCapsule.commit(TxCapsule.java:364)
            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:201)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
            at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
            at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
            at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
            at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
            at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
            at $Proxy212.create(Unknown Source)
            at nl.digipay.merch.inventory.InventoryBean.addArticle(InventoryBean.java:86)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
            at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
            at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
            at org.jboss.ejb.Container.invoke(Container.java:712)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
            at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
            at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
            at $Proxy220.addArticle(Unknown Source)
            at nl.digipay.merch.web.article.SaveAddArticleAction.secureExecute(SaveAddArticleAction.java:85)
            at nl.digipay.merch.web.common.SecureMerchantAction.execute(SecureMerchantAction.java:48)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
            at java.lang.Thread.run(Thread.java:484)
            11:12:39,509 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException:
            java.lang.reflect.UndeclaredThrowableException:
            javax.transaction.RollbackException: Unable to commit, tx=XidImpl [FormatId=257, GlobalId=samsdell//34, BranchQual=] status=STATUS_R
            OLLEDBACK
            at org.jboss.tm.TxCapsule.commit(TxCapsule.java:425)
            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:201)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
            at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
            at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
            at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
            at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
            at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
            at $Proxy212.create(Unknown Source)
            at nl.digipay.merch.inventory.InventoryBean.addArticle(InventoryBean.java:86)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
            at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
            at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
            at org.jboss.ejb.Container.invoke(Container.java:712)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
            at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
            at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
            at $Proxy220.addArticle(Unknown Source)
            at nl.digipay.merch.web.article.SaveAddArticleAction.secureExecute(SaveAddArticleAction.java:85)
            at nl.digipay.merch.web.common.SecureMerchantAction.execute(SecureMerchantAction.java:48)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
            at java.lang.Thread.run(Thread.java:484)
            11:12:39,609 INFO [nl.digipay.merch.web.common.LoggingExceptionHandler] java.rmi.ServerException: RuntimeException; nested exceptio
            n is:
            java.lang.reflect.UndeclaredThrowableException
            11:12:39,609 ERROR [nl.digipay.merch.web.common.LoggingExceptionHandler] Exception
            java.rmi.ServerException: RuntimeException; nested exception is:
            java.lang.reflect.UndeclaredThrowableException
            java.lang.reflect.UndeclaredThrowableException:
            javax.transaction.RollbackException: Unable to commit, tx=XidImpl [FormatId=257, GlobalId=samsdell//34, BranchQual=] status=STATUS_R
            OLLEDBACK
            at org.jboss.tm.TxCapsule.commit(TxCapsule.java:425)
            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:201)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
            at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
            at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
            at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
            at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
            at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
            at $Proxy212.create(Unknown Source)
            at nl.digipay.merch.inventory.InventoryBean.addArticle(InventoryBean.java:86)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
            at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
            at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
            at org.jboss.ejb.Container.invoke(Container.java:712)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
            at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
            at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
            at $Proxy220.addArticle(Unknown Source)
            at nl.digipay.merch.web.article.SaveAddArticleAction.secureExecute(SaveAddArticleAction.java:85)
            at nl.digipay.merch.web.common.SecureMerchantAction.execute(SecureMerchantAction.java:48)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
            at java.lang.Thread.run(Thread.java:484)

            • 3. Re: mysql contraint causes container runtime exception on ej
              jbossed Newbie

              Sorry this is becoming my personal BLOG space...

              I abolished the CMR relation and I'm able to get underlying sqlexceptions out of the CreateException.

              When I have time I'll trace through jboss and find where the problem is. Unless... someone else knows. anyone?

              • 4. Re: mysql contraint causes container runtime exception on ej
                Magnus Newbie

                Hi

                Im a newbee on jboss and Im getting the same error
                with

                -->java.sql.SQLException: Invalid argument value, message from server: "Duplicate entry '0' for key 1"

                mysql is triggering the constraint.
                Has this been solved yet and if so can someone
                tell me how to fix it?

                I dont have any CMR defined...at least I dont think so!

                Regards

                magpio120

                • 5. Re: mysql contraint causes container runtime exception on ej
                  Magnus Newbie

                  Sorry its not the exact smae problem but somehow
                  the auto_increment in not working for my
                  create methods so that I get the value '0'
                  for my auto_incremented column.

                  magpo120