You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by "Shultz, Dmitry" <Dm...@kaltire.com> on 2016/06/01 16:16:07 UTC
beans.xml parsing error during test with CdiTestRunner
Hi All,
Original issue was initially submitted to the wrong topic (forgot to change the email subject - it is brand new issue), it was end of the day ... sorry for the confusion.
http://mail-archives.apache.org/mod_mbox/deltaspike-users/201606.mbox/%3CDM3PR11MB0987CA82CEAF86AFAAECE70995470%40DM3PR11MB0987.namprd11.prod.outlook.com%3E
To clarify, Romain helped with beans.xml parsing error while app is running in TomEE - I upgraded to TomEE 7. This issue (that I'm wrongly send to the wrong topic) appears during CdiTestRunner driven unit test.
How do I fix the test?
Cheers,
Dmitry
RE: beans.xml parsing error during test with CdiTestRunner
Posted by "Shultz, Dmitry" <Dm...@kaltire.com>.
Thanks Raimund, it fixed the original issue.
However, there is still something not quite right. Now it fails with this stacktrace:
SEVERE: Application could not be deployed: D:\Repository\kaltire\mix\fsa-tss2click-adapter\classpath.ear
org.apache.openejb.OpenEJBException: Creating application failed: D:\Repository\kaltire\mix\fsa-tss2click-adapter\classpath.ear: Class org.apache.webbeans.conversation.ConversationStorageBean does not implement the requested interface javax.enterprise.inject.spi.BeanAttributes
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1036)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:714)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:592)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:480)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:66)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:278)
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:497)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:98)
at org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
at org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:46)
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 org.apache.deltaspike.cdise.openejb.OpenEjbContainerControl.boot(OpenEjbContainerControl.java:102)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$ContainerAwareTestContext.applyBeforeClassConfig(CdiTestRunner.java:468)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$BeforeClassStatement.evaluate(CdiTestRunner.java:371)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$AfterClassStatement.evaluate(CdiTestRunner.java:398)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner.run(CdiTestRunner.java:144)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
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:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.IncompatibleClassChangeError: Class org.apache.webbeans.conversation.ConversationStorageBean does not implement the requested interface javax.enterprise.inject.spi.BeanAttributes
at org.apache.webbeans.component.BeanAttributesImpl.<init>(BeanAttributesImpl.java:59)
at org.apache.webbeans.component.third.ThirdpartyBeanImpl.<init>(ThirdpartyBeanImpl.java:41)
at org.apache.webbeans.component.third.PassivationCapableThirdpartyBeanImpl.<init>(PassivationCapableThirdpartyBeanImpl.java:32)
at org.apache.webbeans.container.BeanManagerImpl.addInternalBean(BeanManagerImpl.java:373)
at org.apache.webbeans.conversation.ConversationManager.<init>(ConversationManager.java:69)
at org.apache.webbeans.config.WebBeansContext.<init>(WebBeansContext.java:158)
at org.apache.webbeans.config.WebBeansContext.<init>(WebBeansContext.java:116)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:171)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:908)
... 35 more
java.lang.IllegalStateException: On a thread without an initialized context nor a classloader mapping a deployed app
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:292)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.getContext(ThreadSingletonServiceImpl.java:261)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:321)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:64)
at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:51)
at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:185)
at org.apache.webbeans.config.WebBeansContext.currentInstance(WebBeansContext.java:203)
at org.apache.deltaspike.cdise.openejb.OpenEjbContainerControl.boot(OpenEjbContainerControl.java:109)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$ContainerAwareTestContext.applyBeforeClassConfig(CdiTestRunner.java:468)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$BeforeClassStatement.evaluate(CdiTestRunner.java:371)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$AfterClassStatement.evaluate(CdiTestRunner.java:398)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner.run(CdiTestRunner.java:144)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
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:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Looks similar to this one: https://issues.apache.org/jira/browse/CAMEL-6513
Not sure, what forum (Camel, Deltaspike or TomEE) it belongs to..
Dmitry
-----Original Message-----
From: Raimund Klein [mailto:chessray77@gmail.com]
Sent: June-01-16 9:47 AM
To: users@deltaspike.apache.org
Subject: Re: beans.xml parsing error during test with CdiTestRunner
Hi Dmitry,
Which version of OpenEJB are you using for your test dependency? Could it be in the 4.7... version range, which only supports Java EE 6? If so, you should update the dependency to version 7.0.0:
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>openejb-core</artifactId>
<version>7.0.0</version>
</dependency>
Cheers
Raimund
2016-06-01 17:16 GMT+01:00 Shultz, Dmitry <Dm...@kaltire.com>:
> Hi All,
>
> Original issue was initially submitted to the wrong topic (forgot to
> change the email subject - it is brand new issue), it was end of the
> day ... sorry for the confusion.
>
>
> http://mail-archives.apache.org/mod_mbox/deltaspike-users/201606.mbox/
> %3CDM3PR11MB0987CA82CEAF86AFAAECE70995470%40DM3PR11MB0987.namprd11.pro
> d.outlook.com%3E
>
> To clarify, Romain helped with beans.xml parsing error while app is
> running in TomEE - I upgraded to TomEE 7. This issue (that I'm
> wrongly send to the wrong topic) appears during CdiTestRunner driven unit test.
> How do I fix the test?
>
> Cheers,
> Dmitry
>
>
>
Re: beans.xml parsing error during test with CdiTestRunner
Posted by Raimund Klein <ch...@gmail.com>.
Hi Dmitry,
Which version of OpenEJB are you using for your test dependency? Could it
be in the 4.7... version range, which only supports Java EE 6? If so, you
should update the dependency to version 7.0.0:
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>openejb-core</artifactId>
<version>7.0.0</version>
</dependency>
Cheers
Raimund
2016-06-01 17:16 GMT+01:00 Shultz, Dmitry <Dm...@kaltire.com>:
> Hi All,
>
> Original issue was initially submitted to the wrong topic (forgot to
> change the email subject - it is brand new issue), it was end of the day
> ... sorry for the confusion.
>
>
> http://mail-archives.apache.org/mod_mbox/deltaspike-users/201606.mbox/%3CDM3PR11MB0987CA82CEAF86AFAAECE70995470%40DM3PR11MB0987.namprd11.prod.outlook.com%3E
>
> To clarify, Romain helped with beans.xml parsing error while app is
> running in TomEE - I upgraded to TomEE 7. This issue (that I'm wrongly
> send to the wrong topic) appears during CdiTestRunner driven unit test.
> How do I fix the test?
>
> Cheers,
> Dmitry
>
>
>