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

**URL:** <https://discuss.elastic.co/t/unable-to-deploy-application-using-elasticsearch-resthighlevelclient-to-tomee-7-0-4-when-upgrading-from-6-1-4-to-6-2-4/134132>\
**Category:** Elasticsearch\
**Created:** [June 1, 2018, 3:45am UTC](https://discuss.elastic.co/t/unable-to-deploy-application-using-elasticsearch-resthighlevelclient-to-tomee-7-0-4-when-upgrading-from-6-1-4-to-6-2-4/134132 "2018-06-01T03:45:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![djr4488](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@djr4488](https://discuss.elastic.co/u/djr4488)\
**Post date:** [June 1, 2018, 3:45am UTC](https://discuss.elastic.co/t/unable-to-deploy-application-using-elasticsearch-resthighlevelclient-to-tomee-7-0-4-when-upgrading-from-6-1-4-to-6-2-4/134132/1 "2018-06-01T03:45:12Z")

</div>

I get the following stack trace during deployment:

```auto
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.

```auto
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](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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 1, 2018, 5:51am UTC](https://discuss.elastic.co/t/unable-to-deploy-application-using-elasticsearch-resthighlevelclient-to-tomee-7-0-4-when-upgrading-from-6-1-4-to-6-2-4/134132/2 "2018-06-01T05:51:43Z")

</div>

Interesting. @jasontedor WDYT?

BTW please format your logs.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [June 14, 2018, 6:37pm UTC](https://discuss.elastic.co/t/unable-to-deploy-application-using-elasticsearch-resthighlevelclient-to-tomee-7-0-4-when-upgrading-from-6-1-4-to-6-2-4/134132/3 "2018-06-14T18:37:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 12, 2018, 6:37pm UTC](https://discuss.elastic.co/t/unable-to-deploy-application-using-elasticsearch-resthighlevelclient-to-tomee-7-0-4-when-upgrading-from-6-1-4-to-6-2-4/134132/4 "2018-07-12T18:37:58Z")

</div>

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