OpenEJB
  1. OpenEJB
  2. OPENEJB-1236

Provide JPA 2.0 support in addition to JPA 1.0

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2, 4.0
    • Component/s: None
    • Labels:
      None

      Description

      JPA 2.0 is out since mid December. It'd be nice to support it.
      The difficult part is to be able to keep the JPA 1.0 integration usable.
      It's a challenge, cause APIs aren't the same (EntityManager for example defines more methods).

      1. OPENEJB-1236.patch
        30 kB
        Jean-Louis MONTEIRO
      There are no Sub-Tasks for this issue.

        Activity

        Jean-Louis MONTEIRO created issue -
        Hide
        Will Hoover added a comment -

        looks like openjpa 2.0 is in beta 2 and getting close for release: http://openjpa.apache.org/jpa-20-tasks.html and hibernate 3.5.0 is in release candidate.

        Show
        Will Hoover added a comment - looks like openjpa 2.0 is in beta 2 and getting close for release: http://openjpa.apache.org/jpa-20-tasks.html and hibernate 3.5.0 is in release candidate.
        Jean-Louis MONTEIRO made changes -
        Field Original Value New Value
        Assignee Jean-Louis MONTEIRO [ jean-louis.monteiro@atosorigin.com ]
        Hide
        Jean-Louis MONTEIRO added a comment -

        Started working on that issue.
        Still under tests but it seems to work at least with Hibernate 3.5.0-CR-2.
        I just would like to make JPA 2.0 optional. I mean, i'd like OpenEJB to be able to work with JPA 1.0 implementations as well as JPA 2.0. It seems to be the case, but definitely need to add tests.

        Show
        Jean-Louis MONTEIRO added a comment - Started working on that issue. Still under tests but it seems to work at least with Hibernate 3.5.0-CR-2. I just would like to make JPA 2.0 optional. I mean, i'd like OpenEJB to be able to work with JPA 1.0 implementations as well as JPA 2.0. It seems to be the case, but definitely need to add tests.
        Hide
        Jean-Louis MONTEIRO added a comment -

        Hope i did not forget something.

        Show
        Jean-Louis MONTEIRO added a comment - Hope i did not forget something.
        Jean-Louis MONTEIRO made changes -
        Attachment OPENEJB-1236.patch [ 12439776 ]
        Hide
        Laird Nelson added a comment -

        To be clear: does your fix mean that OpenJPA 2.0 will be the new JPA implementation shipped as part of OpenEJB? Or does it mean that if an application supplies those libraries they can be used?

        Show
        Laird Nelson added a comment - To be clear: does your fix mean that OpenJPA 2.0 will be the new JPA implementation shipped as part of OpenEJB? Or does it mean that if an application supplies those libraries they can be used?
        Hide
        Jean-Louis MONTEIRO added a comment -

        IMHO, the target gonna be to get OpenJPA 2.x as part of the OpenEJB. But, i'd like to leave users free to plug any other implementations.
        It's definitely the case today (you can use either openjpa, hibernate, eclipse-link).
        By the way, to do such, you need

        • to repackage the openejb.war if you are using OpenEJB in Tomcat
        • to change your Maven dependencies in order to exclude OpenJPA and add your own provider otherwise

        The idea is just to extend that by allowing JPA 2.0 as well as JPA 1.0 implementations.

        Show
        Jean-Louis MONTEIRO added a comment - IMHO, the target gonna be to get OpenJPA 2.x as part of the OpenEJB. But, i'd like to leave users free to plug any other implementations. It's definitely the case today (you can use either openjpa, hibernate, eclipse-link). By the way, to do such, you need to repackage the openejb.war if you are using OpenEJB in Tomcat to change your Maven dependencies in order to exclude OpenJPA and add your own provider otherwise The idea is just to extend that by allowing JPA 2.0 as well as JPA 1.0 implementations.
        Hide
        Laird Nelson added a comment -

        Changing Maven dependencies: this is non-trivial, right? After all, the OpenJPA implementation (1.2.1) that's in the OpenEJB pom by default excludes various transitive dependencies--must we application developers/unit testers also take care to exclude the same things if we depend on OpenJPA 2.0?

        Show
        Laird Nelson added a comment - Changing Maven dependencies: this is non-trivial, right? After all, the OpenJPA implementation (1.2.1) that's in the OpenEJB pom by default excludes various transitive dependencies--must we application developers/unit testers also take care to exclude the same things if we depend on OpenJPA 2.0?
        Hide
        Janis Kazakovs added a comment -

        Would be a nice functionality to have. When do you think it could be available?

        Show
        Janis Kazakovs added a comment - Would be a nice functionality to have. When do you think it could be available?
        Hide
        Damian Nowak added a comment -

        Fixing this would be very much appreciated.

        Show
        Damian Nowak added a comment - Fixing this would be very much appreciated.
        Hide
        Jean-Louis MONTEIRO added a comment -

        Actually, it's already available in the trunk. There is still one issue with the openjpa enhancer we need to fix.

        Show
        Jean-Louis MONTEIRO added a comment - Actually, it's already available in the trunk. There is still one issue with the openjpa enhancer we need to fix.
        Hide
        Will Sumekar added a comment -

        just wanted to add that it's available in the trunk as version 3.2.0-SNAPSHOT. the link is: https://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.2-SNAPSHOT/

        Got this info from: http://www.mail-archive.com/users@openejb.apache.org/msg03255.html

        Show
        Will Sumekar added a comment - just wanted to add that it's available in the trunk as version 3.2.0-SNAPSHOT. the link is: https://repository.apache.org/snapshots/org/apache/openejb/openejb-standalone/3.2-SNAPSHOT/ Got this info from: http://www.mail-archive.com/users@openejb.apache.org/msg03255.html
        Hide
        Frank Bitzer added a comment -

        When using the 3.2-SNAPSHOT, is there anything else I have to configure to activate JPA 2.0?
        It seems like it's still using JPA 1.0, I've still the same error: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;

        Show
        Frank Bitzer added a comment - When using the 3.2-SNAPSHOT, is there anything else I have to configure to activate JPA 2.0? It seems like it's still using JPA 1.0, I've still the same error: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
        Hide
        Frank Bitzer added a comment -

        Ok, fixed it. Of course you have to add a dependency to JPA 2.0 . In my case I added:

        <dependency>
        <groupId>org.hibernate.javax.persistence</groupId>
        <artifactId>hibernate-jpa-2.0-api</artifactId>
        <version>1.0.0.Final</version>
        <scope>test</scope>
        </dependency>

        <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>4.1.0.Final</version>
        <scope>test</scope>
        </dependency>

        Show
        Frank Bitzer added a comment - Ok, fixed it. Of course you have to add a dependency to JPA 2.0 . In my case I added: <dependency> <groupId>org.hibernate.javax.persistence</groupId> <artifactId>hibernate-jpa-2.0-api</artifactId> <version>1.0.0.Final</version> <scope>test</scope> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.1.0.Final</version> <scope>test</scope> </dependency>
        Hide
        przemek s?upkowski added a comment -

        In Eclipse Helios SR1 its impossible to use openejb 3.2 to test EJB becouse of error

        INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
        ERROR - CDI Beans module deployment failed
        java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent
        at org.apache.webbeans.event.NotificationManager.filterByExtensionEventType(NotificationManager.java:207)
        at org.apache.webbeans.event.NotificationManager.filterByType(NotificationManager.java:144)
        at org.apache.webbeans.event.NotificationManager.resolveObservers(NotificationManager.java:133)
        at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:419)
        at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:401)
        at org.apache.webbeans.ejb.common.util.EjbUtility.fireEvents(EjbUtility.java:143)
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:176)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:651)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:462)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:372)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:284)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:128)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:274)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:253)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at testsBeans.CrudServiceTest.bootContainer(CrudServiceTest.java:30)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
        INFO - Undeploying app: classpath.ear
        ERROR - Application could not be deployed: classpath.ear
        org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: Error is occurred while starting the CDI container, looks error log for further investigation: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:749)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:462)
        at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:372)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:284)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:128)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:274)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:253)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at testsBeans.CrudServiceTest.bootContainer(CrudServiceTest.java:30)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
        Caused by: org.apache.openejb.OpenEJBException: Error is occurred while starting the CDI container, looks error log for further investigation: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:219)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:651)
        ... 42 more
        Caused by: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:210)
        ... 43 more
        Caused by: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent
        at org.apache.webbeans.event.NotificationManager.filterByExtensionEventType(NotificationManager.java:207)
        at org.apache.webbeans.event.NotificationManager.filterByType(NotificationManager.java:144)
        at org.apache.webbeans.event.NotificationManager.resolveObservers(NotificationManager.java:133)
        at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:419)
        at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:401)
        at org.apache.webbeans.ejb.common.util.EjbUtility.fireEvents(EjbUtility.java:143)
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:176)
        ... 43 more

        Show
        przemek s?upkowski added a comment - In Eclipse Helios SR1 its impossible to use openejb 3.2 to test EJB becouse of error INFO: Adding OpenWebBeansPlugin : [CdiPlugin] ERROR - CDI Beans module deployment failed java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent at org.apache.webbeans.event.NotificationManager.filterByExtensionEventType(NotificationManager.java:207) at org.apache.webbeans.event.NotificationManager.filterByType(NotificationManager.java:144) at org.apache.webbeans.event.NotificationManager.resolveObservers(NotificationManager.java:133) at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:419) at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:401) at org.apache.webbeans.ejb.common.util.EjbUtility.fireEvents(EjbUtility.java:143) at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:176) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:651) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:462) at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:372) at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:284) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:128) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63) at org.apache.openejb.OpenEJB.init(OpenEJB.java:274) at org.apache.openejb.OpenEJB.init(OpenEJB.java:253) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53) at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at testsBeans.CrudServiceTest.bootContainer(CrudServiceTest.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) INFO - Undeploying app: classpath.ear ERROR - Application could not be deployed: classpath.ear org.apache.openejb.OpenEJBException: Creating application failed: classpath.ear: Error is occurred while starting the CDI container, looks error log for further investigation: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:749) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:462) at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:372) at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:284) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:128) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63) at org.apache.openejb.OpenEJB.init(OpenEJB.java:274) at org.apache.openejb.OpenEJB.init(OpenEJB.java:253) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53) at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at testsBeans.CrudServiceTest.bootContainer(CrudServiceTest.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.apache.openejb.OpenEJBException: Error is occurred while starting the CDI container, looks error log for further investigation: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:219) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:651) ... 42 more Caused by: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:210) ... 43 more Caused by: java.lang.ClassCastException: org.apache.webbeans.portable.events.generics.GProcessSessionBean cannot be cast to org.apache.webbeans.portable.events.generics.GenericBeanEvent at org.apache.webbeans.event.NotificationManager.filterByExtensionEventType(NotificationManager.java:207) at org.apache.webbeans.event.NotificationManager.filterByType(NotificationManager.java:144) at org.apache.webbeans.event.NotificationManager.resolveObservers(NotificationManager.java:133) at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:419) at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:401) at org.apache.webbeans.ejb.common.util.EjbUtility.fireEvents(EjbUtility.java:143) at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:176) ... 43 more
        Hide
        Andries Inzé added a comment -

        Will this be part of OpenEJB 3.2?

        Show
        Andries Inzé added a comment - Will this be part of OpenEJB 3.2?
        Hide
        Thiago Veronezi added a comment -

        I found some time to work on this issue during this weekend, and I hope to give some good news soon.

        Show
        Thiago Veronezi added a comment - I found some time to work on this issue during this weekend, and I hope to give some good news soon.
        Hide
        Viggo Navarsete added a comment -

        Using the latest 3.2-SNAPSHOT release of OpenEJB I get the following stacktrace:

        ERROR - Application could not be deployed:  /home/viggo/workspace/MDS_TRUNK_JBOSS_6/mds-main/mds-biz-ejb/target/classpath.ear
        org.apache.openejb.OpenEJBException: Creating application failed: /home/viggo/workspace/MDS_TRUNK_JBOSS_6/mds-main/mds-biz-ejb/target/classpath.ear: org.apache.webbeans.container.BeanManagerImpl.getInterceptors()Ljava/util/Set;
        	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:753)
        	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:462)
        	at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:372)
        	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:284)
        	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:130)
        	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63)
        	at org.apache.openejb.OpenEJB.init(OpenEJB.java:276)
        	at org.apache.openejb.OpenEJB.init(OpenEJB.java:255)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        	at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        	at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        	at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        	at javax.naming.InitialContext.init(InitialContext.java:223)
        	at javax.naming.InitialContext.<init>(InitialContext.java:197)
        	at com.tracetracker.mds.adm.query.gensvc.MasterDataQueryBeanTest.setUp(MasterDataQueryBeanTest.java:58)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
        	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
        	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
        	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:140)
        	at org.apache.maven.surefire.Surefire.run(Surefire.java:109)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017)
        Caused by: java.lang.NoSuchMethodError: org.apache.webbeans.container.BeanManagerImpl.getInterceptors()Ljava/util/Set;
        	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:204)
        	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:210)
        	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:52)
        	at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:46)
        	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:650)
        	... 46 more
        
        
        Show
        Viggo Navarsete added a comment - Using the latest 3.2-SNAPSHOT release of OpenEJB I get the following stacktrace: ERROR - Application could not be deployed: /home/viggo/workspace/MDS_TRUNK_JBOSS_6/mds-main/mds-biz-ejb/target/classpath.ear org.apache.openejb.OpenEJBException: Creating application failed: /home/viggo/workspace/MDS_TRUNK_JBOSS_6/mds-main/mds-biz-ejb/target/classpath.ear: org.apache.webbeans.container.BeanManagerImpl.getInterceptors()Ljava/util/Set; at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:753) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:462) at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:372) at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:284) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:130) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63) at org.apache.openejb.OpenEJB.init(OpenEJB.java:276) at org.apache.openejb.OpenEJB.init(OpenEJB.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53) at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at com.tracetracker.mds.adm.query.gensvc.MasterDataQueryBeanTest.setUp(MasterDataQueryBeanTest.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.Surefire.run(Surefire.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017) Caused by: java.lang.NoSuchMethodError: org.apache.webbeans.container.BeanManagerImpl.getInterceptors()Ljava/util/Set; at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:204) at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:210) at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:52) at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:46) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:650) ... 46 more
        Hide
        Viggo Navarsete added a comment -

        Consider my issue explained in previous comment to be a bug that should be fixed as soon as possible since it makes OpenEJB 3.2-SNAPSHOT useless: https://issues.apache.org/jira/browse/OPENEJB-1450

        Show
        Viggo Navarsete added a comment - Consider my issue explained in previous comment to be a bug that should be fixed as soon as possible since it makes OpenEJB 3.2-SNAPSHOT useless: https://issues.apache.org/jira/browse/OPENEJB-1450
        Hide
        Jean-Louis MONTEIRO added a comment -

        already answered in the other JIRA. It's not actually linked to JPA 2 support.

        Show
        Jean-Louis MONTEIRO added a comment - already answered in the other JIRA. It's not actually linked to JPA 2 support.
        Jean-Louis MONTEIRO made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 3.2 [ 12316332 ]
        Fix Version/s 4.0 [ 12315051 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Jean-Louis MONTEIRO
            Reporter:
            Jean-Louis MONTEIRO
          • Votes:
            10 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development