You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by se...@gmail.com on 2011/02/05 20:19:18 UTC
OpenEJB 3.1.4 problem
Hi!
I try create unit test for my ejb-based web service.
I got next error:
ERROR - FATAL ERROR: Unknown error in Assembler. Please send the following
stack trace and this message to users@openejb.apache.org :
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.apache.openejb.config.AnnotationDeployer$MethodMember.getType(AnnotationDeployer.java:3367)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildWebServiceRef(AnnotationDeployer.java:2875)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildAnnotatedRefs(AnnotationDeployer.java:2250)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:788)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:692)
at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:194)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:248)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:626)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:576)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:391)
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: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.artezio.e4.payment.PaymentServiceImplTest.testPutPayment(PaymentServiceImplTest.java:44)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
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:289)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
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: 0: 0
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)
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: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.artezio.e4.payment.PaymentServiceImplTest.testPutPayment(PaymentServiceImplTest.java:44)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
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:289)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at
org.apache.openejb.config.AnnotationDeployer$MethodMember.getType(AnnotationDeployer.java:3367)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildWebServiceRef(AnnotationDeployer.java:2875)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildAnnotatedRefs(AnnotationDeployer.java:2250)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:788)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:692)
at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:194)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:248)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:626)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:576)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:391)
at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:300)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:279)
-------------------------
testPutPayment(com.artezio.e4.payment.PaymentServiceImplTest) Time elapsed:
3.978 sec <<< ERROR!
javax.naming.NamingException: Attempted to load OpenEJB.
java.lang.ArrayIndexOutOfBoundsException: 0: 0 [Root exception is
org.apache.openejb.OpenEJBException:
java.lang.ArrayIndexOutOfBoundsException: 0: 0]
at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:55)
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.artezio.e4.payment.PaymentServiceImplTest.testPutPayment(PaymentServiceImplTest.java:44)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
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:289)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
Caused by: org.apache.openejb.OpenEJBException:
java.lang.ArrayIndexOutOfBoundsException: 0: 0
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)
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: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)
... 29 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at
org.apache.openejb.config.AnnotationDeployer$MethodMember.getType(AnnotationDeployer.java:3367)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildWebServiceRef(AnnotationDeployer.java:2875)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildAnnotatedRefs(AnnotationDeployer.java:2250)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:788)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:692)
at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:194)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:248)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:626)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:576)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:391)
at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:300)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:279)
Re: OpenEJB 3.1.4 problem
Posted by David Blevins <da...@visi.com>.
On Feb 5, 2011, at 11:19 AM, sergey.chernolyas@gmail.com wrote:
> Hi!
>
> I try create unit test for my ejb-based web service.
> I got next error:
>
> ERROR - FATAL ERROR: Unknown error in Assembler. Please send the following stack trace and this message to users@openejb.apache.org :
> java.lang.ArrayIndexOutOfBoundsException: 0
> at org.apache.openejb.config.AnnotationDeployer$MethodMember.getType(AnnotationDeployer.java:3367)
> at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildWebServiceRef(AnnotationDeployer.java:2875)
> at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.buildAnnotatedRefs(AnnotationDeployer.java:2250)
We should definitely improve the error checking on this one, but it looks like you might have a setter method that has no arguments.
I.e.
@WebServiceRef
public void setFooService() {...
Instead of the required:
@WebServiceRef
public void setFooService(FooService foo) {...
-David