tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cfnz <...@hill-labs.co.nz>
Subject AnnotationFinder failed - where to start?
Date Thu, 03 Sep 2015 01:51:01 GMT
Hi first off... I am new to TomEE and any EE/CDI in general... (so please
forgive my ignorance)

So I was just trying to take the Movies jpa-eclipselink example (which
works) and make it work in my test project which has quite a few JPA
Entities.

It has taken me a while to figure out that my Stateful bean is not being
discovered rather than it being a problem with my EJB Container and Context
stuff...

I managed to miss the log messages because of all the other Eclipse Link log
stuff that filled up by console window cache... once I reduced that, I found
I was looking in the wrong direction... maybe not a Context thing at all
rather my Stateful bean was not getting found in the first place.

So now I have the following from the log: 

WARNING - Unable to scrape for @Stateful, @Stateless, @Singleton or
@MessageDriven annotations. AnnotationFinder failed.
java.lang.RuntimeException
	at org.apache.xbean.asm5.MethodVisitor.visitTypeAnnotation(Unknown Source)
	at org.apache.xbean.asm5.ClassReader.b(Unknown Source)
	at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
	at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
	at
org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinder.java:1170)
	at
org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java:147)
	at
org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java:160)
	at
org.apache.openejb.config.FinderFactory$OpenEJBAnnotationFinder.<init>(FinderFactory.java:514)
	at
org.apache.openejb.config.FinderFactory.newFinder(FinderFactory.java:259)
	at org.apache.openejb.config.FinderFactory.create(FinderFactory.java:113)
	at
org.apache.openejb.config.FinderFactory.createFinder(FinderFactory.java:66)
	at
org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:1292)
	at
org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:442)
	at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:356)
	at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
	at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
	at
org.apache.openejb.OpenEjbContainer$Provider.createEJBContainer(OpenEjbContainer.java:314)
	at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:56)
	at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:43)
	at
com.hilllaboratories.labsys.model.activitydef.ActivityDefTomeeTest.testActivityDefTomee(ActivityDefTomeeTest.java:40)
	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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:696)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189)
	at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
	at org.testng.SuiteRunner.run(SuiteRunner.java:254)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
	at org.testng.TestNG.run(TestNG.java:1057)
	at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

I have tried this with org.apache.openejb artifactId javaee-api version
6.0-6 and 7.0-SNAPSHOT, 
openejb-core 5.0.0-SNAPSHOT and version 4.7.2.

Not sure where to head next... 

Was going to look at using the ejb-jar.xml but will have to do some reading
first. Also thought about trying to include/exclude some of my Model dirs
that don't have the EE annotations (I only have one at this stage :-), but
still need to read up on that too.

So I guess I am just after some direction on how to learn what I need to
know. Any pointers on good tutorials?

I am not sure what is causing the exception above, is there anyway to see
what class caused the issue.

I am using Lombok in my model, just in case that messes with anything?

Thanks for any pointers.
Newbie Colin.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/AnnotationFinder-failed-where-to-start-tp4676071.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message