to be honest I have had some troubles with Java8 and jee too. Currently at
our customer sites we advice to stay on java7

On Tue Nov 18 2014 at 15:36:42 Romain Manni-Bucau <[email protected]>
wrote:

> Hi
>
> maybe try to upgrade openejb version to 4.7.1
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2014-11-18 13:58 GMT+01:00 slawek <[email protected]>:
> > Hello,
> >
> > Yes, I did. I run tests just from eclipse junit button without maven or
> ant.
> > Additionally, when test fails, it shows:
> >
> > javax.ejb.EJBException: Cannot obtain a free instance.; nested exception
> is:
> >         org.apache.openejb.InvalidateReferenceException:
> java.rmi.RemoteException:
> > The bean encountered a non-application exception; nested exception is:
> >         <openjpa-2.3.0-nonfinal-1540826-r422266:1542644 fatal general
> error>
> > org.apache.openjpa.persistence.PersistenceException: null: The bean
> > encountered a non-application exception; nested exception is:
> >         <openjpa-2.3.0-nonfinal-1540826-r422266:1542644 fatal general
> error>
> > org.apache.openjpa.persistence.PersistenceException: null
> >         at
> > org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(
> BaseEjbProxyHandler.java:408)
> >         at
> > org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(
> BaseEjbProxyHandler.java:312)
> >         at com.sun.proxy.$Proxy51.przywitajSie(Unknown Source)
> >         at pl.test.dn.fk.test.UslugiTest.przywitajSieTest(UslugiTest.
> java:81)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:57)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:606)
> >         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.InvokeMethod.
> evaluate(InvokeMethod.java:20)
> >         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.internal.runners.statements.RunBefores.
> evaluate(RunBefores.java:28)
> >         at
> > org.junit.internal.runners.statements.RunAfters.evaluate(
> RunAfters.java:31)
> >         at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> >         at
> > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(
> JUnit4TestReference.java:50)
> >         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.InvalidateReferenceException:
> > java.rmi.RemoteException: The bean encountered a non-application
> exception;
> > nested exception is:
> >         <openjpa-2.3.0-nonfinal-1540826-r422266:1542644 fatal general
> error>
> > org.apache.openjpa.persistence.PersistenceException: null: The bean
> > encountered a non-application exception; nested exception is:
> >         <openjpa-2.3.0-nonfinal-1540826-r422266:1542644 fatal general
> error>
> > org.apache.openjpa.persistence.PersistenceException: null
> >         at
> > org.apache.openejb.core.transaction.EjbTransactionUtil.
> handleSystemException(EjbTransactionUtil.java:156)
> >         at org.apache.openejb.BeanContext.newInstance(
> BeanContext.java:1593)
> >         at
> > org.apache.openejb.core.stateless.StatelessInstanceManager.
> createInstance(StatelessInstanceManager.java:207)
> >         at
> > org.apache.openejb.core.stateless.StatelessInstanceManager.getInstance(
> StatelessInstanceManager.java:199)
> >         at
> > org.apache.openejb.core.stateless.StatelessContainer.
> invoke(StatelessContainer.java:186)
> >         at
> > org.apache.openejb.core.ivm.EjbObjectProxyHandler.
> synchronizedBusinessMethod(EjbObjectProxyHandler.java:308)
> >         at
> > org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(
> EjbObjectProxyHandler.java:303)
> >         at
> > org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(
> EjbObjectProxyHandler.java:92)
> >         at
> > org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(
> BaseEjbProxyHandler.java:308)
> >         ... 26 more
> > Caused by: java.rmi.RemoteException: The bean encountered a
> non-application
> > exception; nested exception is:
> >         <openjpa-2.3.0-nonfinal-1540826-r422266:1542644 fatal general
> error>
> > org.apache.openjpa.persistence.PersistenceException: null
> >         at
> > org.apache.openejb.core.transaction.EjbTransactionUtil.
> handleSystemException(EjbTransactionUtil.java:155)
> >         ... 34 more
> > Caused by: <openjpa-2.3.0-nonfinal-1540826-r422266:1542644 fatal general
> > error> org.apache.openjpa.persistence.PersistenceException: null
> >         at
> > org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(
> ClassRedefiner.java:96)
> >         at
> > org.apache.openjpa.enhance.ManagedClassSubclasser.
> prepareUnenhancedClasses(ManagedClassSubclasser.java:176)
> >         at
> > org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(
> AbstractBrokerFactory.java:312)
> >         at
> > org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(
> AbstractBrokerFactory.java:236)
> >         at
> > org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(
> AbstractBrokerFactory.java:212)
> >         at
> > org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(
> DelegatingBrokerFactory.java:155)
> >         at
> > org.apache.openjpa.persistence.EntityManagerFactoryImpl.
> createEntityManager(EntityManagerFactoryImpl.java:226)
> >         at
> > org.apache.openjpa.persistence.EntityManagerFactoryImpl.
> createEntityManager(EntityManagerFactoryImpl.java:59)
> >         at
> > org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory
> .createEntityManager(ReloadableEntityManagerFactory.java:160)
> >         at
> > org.apache.openejb.persistence.JtaEntityManagerRegistry.
> getEntityManager(JtaEntityManagerRegistry.java:119)
> >         at
> > org.apache.openejb.persistence.JtaEntityManager.getEntityManager(
> JtaEntityManager.java:96)
> >         at
> > org.apache.openejb.persistence.JtaEntityManager.typedProxyIfNoTx(
> JtaEntityManager.java:331)
> >         at
> > org.apache.openejb.persistence.JtaEntityManager.
> createQuery(JtaEntityManager.java:405)
> >         at pl.test.dn.fk.ejb.UslugiImp.pobierzNaPoczatek(UslugiImp.
> java:118)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:57)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:606)
> >         at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext$
> Invocation.invoke(ReflectionInvocationContext.java:192)
> >         at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext$
> LifecycleInvocation.invoke(ReflectionInvocationContext.java:223)
> >         at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(
> ReflectionInvocationContext.java:173)
> >         at
> > org.apache.openejb.monitoring.StatsInterceptor.record(
> StatsInterceptor.java:181)
> >         at
> > org.apache.openejb.monitoring.StatsInterceptor.PostConstruct(
> StatsInterceptor.java:109)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:57)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:606)
> >         at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext$
> Invocation.invoke(ReflectionInvocationContext.java:192)
> >         at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(
> ReflectionInvocationContext.java:173)
> >         at
> > org.apache.openejb.core.interceptor.InterceptorStack.
> invoke(InterceptorStack.java:85)
> >         at org.apache.openejb.BeanContext.newInstance(
> BeanContext.java:1590)
> >         ... 33 more
> > Caused by: java.lang.reflect.InvocationTargetException
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:57)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:606)
> >         at
> > org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(
> ClassRedefiner.java:85)
> >         ... 63 more
> > Caused by: java.lang.VerifyError
> >         at sun.instrument.InstrumentationImpl.retransformClasses0(Native
> Method)
> >         at
> > sun.instrument.InstrumentationImpl.retransformClasses(
> InstrumentationImpl.java:144)
> >         ... 68 more
> >
> > But this error is only on first test using ejb, next tests are passed.
> >
> >
> >
> >
> > -----
> > Best Regards
> > sw
> > --
> > View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/EJBContainer-and-tests-tp4672761p4672918.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to