Tomcat not starting after adding Elastic search High Level Client Dependency

171 Views Asked by At

I have an existing project deployed into Tomcat v 8.5.

Once I added the elastic Search High Level client dependency, I am getting below exception while starting the server.

FYI. Earlier I have added a main method and wrote some basic code to do a POC on ES high level client and that time I had to exclude couple of dependency from other dependency as I was ClassNotFoundException.

Can someone help on this please?

 <dependency>
                <groupId>org.elasticsearch.client</groupId>
                <artifactId>elasticsearch-rest-high-level-client</artifactId>
                <version>7.6.1</version>
 </dependency>

Though the exception trace doesn't say anything related to Elastic search but when i remove the dependency server gets started without any issue.

Exception is -->

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/register-services]]
  at java.util.concurrent.FutureTask.report(FutureTask.java:122)
  at java.util.concurrent.FutureTask.get(FutureTask.java:192)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
  at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
  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.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/register-services]]
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
  ... 6 more
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Unable to create annotation scanner for web module register-services: null
  at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2299)
  at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1187)
  at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
  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:5087)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  ... 6 more
Caused by: org.apache.openejb.OpenEJBException: Unable to create annotation scanner for web module register-services: 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:2297)
  ... 12 more
Caused by: java.lang.IllegalArgumentException
  at org.apache.xbean.asm5.ClassReader.<init>(Unknown Source)
  at org.apache.xbean.asm5.ClassReader.<init>(Unknown Source)
  at org.apache.xbean.asm5.ClassReader.<init>(Unknown Source)
  at org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinder.java:1169)
  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: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)
  ... 14 more

Mar 17, 2020 7:16:37 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
  at java.util.concurrent.FutureTask.report(FutureTask.java:122)
  at java.util.concurrent.FutureTask.get(FutureTask.java:192)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
  at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
  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:498)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
  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.catalina.LifecycleException: A child container failed during start
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
  at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  ... 6 more
0

There are 0 best solutions below