tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: openEJB fail on second test
Date Sun, 19 Feb 2012 16:30:59 GMT
Hi,

Sometimes eclipse merges src/main and src/test, maybe add a beans.xml in
both resources.

Le 19 févr. 2012 16:56, "amber" <amber63@hotmail.fr> a écrit :

> Hi,
>
> I have two tests that are well running within Eclipse (context menu run as
> junit test), but under Maven the second always failed (I had tried to
> inverted order, but it s always second that failed)
>
> From the surfire report I got this :
>
>
> -------------------------------------------------------------------------------
> Test set: org.foo.services.category.CategoryServiceBeanTest
>
> -------------------------------------------------------------------------------
> Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.016 sec
> <<< FAILURE!
> createCategory(org.foo.services.category.CategoryServiceBeanTest)  Time
> elapsed: 0 sec  <<< ERROR!
> org.apache.openejb.OpenEjbContainer$NoInjectionMetaDataException:
> org.foo.services.category.CategoryServiceBeanTest
>        at
> org.apache.openejb.OpenEjbContainer.inject(OpenEjbContainer.java:128)
>        at
>
> org.apache.openejb.OpenEjbContainer$GlobalContext.bind(OpenEjbContainer.java:579)
>        at
>
> org.foo.services.category.CategoryServiceBeanTest.<init>(CategoryServiceBeanTest.java:53)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>        at
>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>        at
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>        at
>
> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
>        at
>
> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
>        at
>
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>        at
>
> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
>        at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>        at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>        at
>
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
>        at
>
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
>        at
>
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
>        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.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
>        at
>
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
>        at
>
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
>        at
>
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
>        at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
>
> The line at
>
> org.foo.services.category.CategoryServiceBeanTest.<init>(CategoryServiceBeanTest.java:53)
> is
>
>
> "       EJBContainer.createEJBContainer(p).getContext().bind("inject",
> this); "
>
> any idea?
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/openEJB-fail-on-second-test-tp4401889p4401889.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message