[ https://issues.apache.org/jira/browse/OPENEJB-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17191555#comment-17191555 ]
Romain Manni-Bucau commented on OPENEJB-2147: --------------------------------------------- [~sameerti_nok] you will go from javaee5 to javaee 6 or 7 but it is backward compatible so should be smooth if your application is portable. Other combinations are not (can't be today) tested nor guaranteed. > open-ejb upgrade from 3.1.4 doesn't support java 8 lambda expressions > --------------------------------------------------------------------- > > Key: OPENEJB-2147 > URL: https://issues.apache.org/jira/browse/OPENEJB-2147 > Project: OpenEJB > Issue Type: Bug > Components: container system > Reporter: Sameer Tiwari > Priority: Blocker > Attachments: maven-module-versions.txt > > > 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: > {code:java} > -------------------------------------------------------------------------------------------------------------- > 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 > us...@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) > ....{code} > > 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 > > {color:#ff0000}*Caused by: java.lang.NoSuchMethodError: > javax.ejb.ApplicationException.inherited()Z*{color} > So could you please help us with this openejb upgrade procedure? > -- This message was sent by Atlassian Jira (v8.3.4#803005)