Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-2147

open-ejb upgrade from 3.1.4 doesn't support java 8 lambda expressions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • None
    • None
    • container system
    • None

    Description

      We have following versions in our poms

      <openejb.javaee-api.version>5.0-3</openejb.javaee-api.version> <openejb.core.version>3.1.4</openejb.core.version>

      Our build time unit tests work with above versions with java 8 as long as there's NO Java 8 lambda expressions in code

      As soon as we add any lambda expression we get errors like following:

      -------------------------------------------------------------------------------------------------------------- T E S T S-------------------------------------------------------Running com.a.b.c.d.e.f.ZTResourceTest Apache OpenEJB 3.1.4    build: 20101112-03:32http://openejb.apache.org/ERROR - FATAL ERROR: Unknown error in Assembler.  Please send the following stack trace and this message to users@openejb.apache.org : java.lang.ArrayIndexOutOfBoundsException: 25460 at org.apache.xbean.asm.ClassReader.readClass(Unknown Source) at org.apache.xbean.asm.ClassReader.accept(Unknown Source) at org.apache.xbean.asm.ClassReader.accept(Unknown Source) at org.apache.openejb.util.AnnotationFinder.readClassDef(AnnotationFinder.java:253) at org.apache.openejb.util.AnnotationFinder.find(AnnotationFinder.java:157) at org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1210) at org.apache.openejb.config.DeploymentsResolver.processUrls(DeploymentsResolver.java:365) at org.apache.openejb.config.DeploymentsResolver.loadFromClasspath(DeploymentsResolver.java:217) at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:379) at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:300) at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:279) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60) at org.apache.openejb.OpenEJB.init(OpenEJB.java:271) at org.apache.openejb.OpenEJB.init(OpenEJB.java:250) 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.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:684) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) at javax.naming.InitialContext.init(InitialContext.java:244) at javax.naming.InitialContext.<init>(InitialContext.java:216) at motive.test.BaseServiceTest.initialize(BaseServiceTest.java:119) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
       
      FATAL - OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.FATAL - OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.org.apache.openejb.OpenEJBException: java.lang.ArrayIndexOutOfBoundsException: 25460: 25460 at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:293) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125) at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
      
      ....

       

      So we modified those versions to below:

      <openejb.javaee-api.version>6.0-6</openejb.javaee-api.version> <openejb.core.version>4.7.5</openejb.core.version>

      Then some of our classes were using following Response class 

      javax.ws.rs.core.Response from javax.ws.rs module however upon add above versions, it started picking up this class from above ones and we got many compilation errors about readEntity method missing for javax.ws.rs.core.Response class

      If we try and add javax.ws.rs maven module in poms then we get some other issues about 

       

      Caused by: java.lang.NoSuchMethodError: javax.ejb.ApplicationException.inherited()Z

      So could you please help us with this openejb upgrade procedure?

       

      Attachments

        1. maven-module-versions.txt
          7 kB
          Sameer Tiwari
        2. tomee.log
          767 kB
          Sameer Tiwari

        Activity

          People

            Unassigned Unassigned
            sameerti_nok Sameer Tiwari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: