1 Reply Latest reply on Apr 27, 2006 10:51 AM by Andreas Ioanid

    Bug in 1.0.0RC2 ManagedPersistenceContext

    Andreas Ioanid Newbie

      looks like ManagedPersistenceContext.getEntitymanager() uses an old version of EntityManager:

      In hibernate-all.jar which is packaged with seam-1.0.0CR2 the method EntityManager.joinTransaction() exists.
      In ejb3-persistence.jar (jboss4.0.4.RC1) this method is removed...

       @Unwrap
       public EntityManager getEntityManager() throws NamingException, SystemException
       {
       if ( Transactions.isTransactionActive() )
       {
       entityManager.joinTransaction();
       }
       return entityManager;
       }
      


      I've attached the relevant piece of stacktrace from seam-issues example application
      15:07:59,718 ERROR [STDERR] Caused by: java.lang.reflect.InvocationTargetException
      15:07:59,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:07:59,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:07:59,718 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:07:59,761 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      15:07:59,761 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
      15:07:59,761 ERROR [STDERR] at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
      15:07:59,761 ERROR [STDERR] ... 131 more
      15:07:59,761 ERROR [STDERR] Caused by: java.lang.NoSuchMethodError: javax.persistence.EntityManager.joinTransaction()V
      15:07:59,761 ERROR [STDERR] at org.jboss.seam.core.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:70)
      15:07:59,761 ERROR [STDERR] ... 137 more
      



      Regards,
      andreas