Unable to deploy application using ElasticSearch RestHighLevelClient to TomEE 7.0.4 when upgrading from 6.1.4 to 6.2.4


(Danny Rucker) #1

I get the following stack trace during deployment:

01-Jun-2018 03:12:44.497 INFO [localhost-startStop-1] org.apache.openejb.util.JarExtractor.extract Extracted path: /usr/local/tomee/webapps/ROOT
01-Jun-2018 03:12:46.428 SEVERE [localhost-startStop-1] sun.reflect.NativeMethodAccessorImpl.invoke ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:988)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1860)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Unable to create annotation scanner for web module : null
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2305)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1188)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: org.apache.openejb.OpenEJBException: Unable to create annotation scanner for web module : null
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:886)
at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:233)
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2303)
... 16 more
Caused by: java.lang.IllegalArgumentException
at org.apache.xbean.asm5.ClassReader.(Unknown Source)
at org.apache.xbean.asm5.ClassReader.(Unknown Source)
at org.apache.xbean.asm5.ClassReader.(Unknown Source)
at org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinder.java:1169)
at org.apache.xbean.finder.AnnotationFinder.(AnnotationFinder.java:147)
at org.apache.xbean.finder.AnnotationFinder.(AnnotationFinder.java:160)
at org.apache.openejb.config.FinderFactory$OpenEJBAnnotationFinder.(FinderFactory.java:546)
at org.apache.openejb.config.FinderFactory.newFinder(FinderFactory.java:267)
at org.apache.openejb.config.FinderFactory.create(FinderFactory.java:80)
at org.apache.openejb.config.FinderFactory.createFinder(FinderFactory.java:69)
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:878)
... 18 more
2018-06-01T03:12:46.490200800Z
01-Jun-2018 03:12:46.428 SEVERE [localhost-startStop-1] sun.reflect.NativeMethodAccessorImpl.invoke Error deploying web application archive [/usr/local/tomee/webapps/ROOT.war]
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:756)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:988)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1860)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2018-06-01T03:12:46.507613900Z

The following snippet of the stack trace during deploying of application indicates that it doesn't like a particular class that is being loaded. Sadly, TomEE's logging isn't very good, so after some trial and error, I downgraded one change at a time, and ElasticSearch only works when at version 6.1.4 or lower.

Caused by: org.apache.openejb.OpenEJBException: Unable to create annotation scanner for web module : null
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:886)
at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:233)
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2303)
... 16 more
Caused by: java.lang.IllegalArgumentException
at org.apache.xbean.asm5.ClassReader.(Unknown Source)

For similar details:
https://java.wekeepcoding.com/article/12122117/tomee+webservice+doesn't+deploy+-+asm+error+-+Unable+to+create+annotation+scanner+for+web+module+simple-webservice%3A+43626

I believe the error indicates that it doesn't like the bytecode of a particular class, maybe it was built with Java10? On my local machine I am only using Java 8.


(David Pilato) #2

Interesting. @jasontedor WDYT?

BTW please format your logs.


(Jason Tedor) #3

I don't think this is an Elasticsearch issue. Either it is a bug in the JDK 9 compiler or a bug in ASM/Tomcat.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.