Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3158

jta-and-hibernate-standalone Narayana quickstart will not execute properly - EntityExistsException

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Done
    • None
    • 5.10.5.Final
    • Testing
    • None
    • Hide

      Execute

      mvn clean package exec:java -Dexec.args="commit 'Test Value'"

      in the root directory of the project.

      Show
      Execute mvn clean package exec:java -Dexec.args="commit 'Test Value'" in the root directory of the project.

    Description

      One of the Narayana quickstarts throws the following exception when executed according to the steps in README.md:

      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:293)
      at java.lang.Thread.run (Thread.java:748)
      Caused by: javax.persistence.EntityExistsException: A different object with the same identifier value was already associated with the session : org.jboss.narayana.quickstart.jta.QuickstartEntity#1
      at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert (AbstractEntityManagerImpl.java:1664)
      at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert (AbstractEntityManagerImpl.java:1602)
      at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert (AbstractEntityManagerImpl.java:1608)
      at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist (AbstractEntityManagerImpl.java:1152)
      at org.jboss.narayana.quickstart.jta.QuickstartEntityRepository.save (QuickstartEntityRepository.java:45)
      at org.jboss.narayana.quickstart.jta.QuickstartEntityRepository$Proxy$_$$_WeldSubclass.save$$super (Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal (TerminalAroundInvokeInvocationContext.java:49)
      at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed (AroundInvokeInvocationContext.java:77)
      at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.invokeInCallerTx (TransactionalInterceptorBase.java:186)
      at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired.doIntercept (TransactionalInterceptorRequired.java:55)
      at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.intercept (TransactionalInterceptorBase.java:88)
      at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired.intercept (TransactionalInterceptorRequired.java:47)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke (SimpleInterceptorInvocation.java:74)
      at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke (InterceptorMethodHandler.java:84)
      at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception (InterceptorMethodHandler.java:72)
      at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke (InterceptorMethodHandler.java:56)
      at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke (CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
      at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke (CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
      at org.jboss.narayana.quickstart.jta.QuickstartEntityRepository$Proxy$_$$_WeldSubclass.save (Unknown Source)
      at org.jboss.narayana.quickstart.jta.QuickstartService.executeDemonstration (QuickstartService.java:106)
      at org.jboss.narayana.quickstart.jta.QuickstartService.demonstrateCommit (QuickstartService.java:55)
      at org.jboss.narayana.quickstart.jta.QuickstartApplication.main (QuickstartApplication.java:78)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:293)
      at java.lang.Thread.run (Thread.java:748)

      Attachments

        Activity

          People

            mkunwar1 Mayank Kunwar
            mzezulka_rh Miloslav Žežulka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: