skip to Main Content

Good evening,

I want to monitor my webapplication and read about the ease of javamelody. From the documentation it should be as easy as copying javamelody and jrobin into the webapp’s WEB-INF/lib and restart the tomcat.

But I get a WebBeansDeploymentException when I startup tomcat with these two jar’s in my WEB-INF/lib: javamelody-core-1.73.1.jar, jrobin-1.5.9.jar

I’m using openJPA, my beans.xml file is empty, but does exist.

My configuration:

Apache Tomcat: 8.5
Java: 1.8
javaee-api: 7.0
javamelody-core: 1.71.3
jrobin: 1.5.9

Since I did not find much about this issue on stackoverflow or google, I’d be thankful for any hint or link for further reading!

Thanks in advance!

Full Stacktrace:

Jul 06, 2018 10:45:27 PM org.apache.openejb.cdi.OpenEJBLifecycle
startApplication SEVERE: CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException: WebBeans
configuration defined in
jar:file:/home/xxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar!/META-INF/beans.xml
did fail. Reason is : Interceptor class :
net.bull.javamelody.MonitoringAsynchronousCdiInterceptor must have at
least one @InterceptorBinding at
org.apache.webbeans.config.BeansDeployer.configureInterceptors(BeansDeployer.java:1464)
at
org.apache.webbeans.config.BeansDeployer.deployFromXML(BeansDeployer.java:1338)
at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:256)
at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41) at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
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)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Jul 06, 2018 10:45:27 PM org.apache.tomee.catalina.TomcatWebAppBuilder
startInternal SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myproject] javax.enterprise.inject.spi.DeploymentException: couldn’t start owb
context at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41) at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
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)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.apache.openejb.OpenEJBRuntimeException:
org.apache.webbeans.exception.WebBeansDeploymentException: WebBeans
configuration defined in
jar:file:/home/xxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar!/META-INF/beans.xml
did fail. Reason is : Interceptor class :
net.bull.javamelody.MonitoringAsynchronousCdiInterceptor must have at
least one @InterceptorBinding at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
… 15 more Caused by:
org.apache.webbeans.exception.WebBeansDeploymentException: WebBeans
configuration defined in
jar:file:/home/xxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar!/META-INF/beans.xml
did fail. Reason is : Interceptor class :
net.bull.javamelody.MonitoringAsynchronousCdiInterceptor must have at
least one @InterceptorBinding at
org.apache.webbeans.config.BeansDeployer.configureInterceptors(BeansDeployer.java:1464)
at
org.apache.webbeans.config.BeansDeployer.deployFromXML(BeansDeployer.java:1338)
at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:256)
at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
… 16 more

Jul 06, 2018 10:45:27 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: ContainerBase.removeChild: destroy:
org.apache.catalina.LifecycleException: An invalid Lifecycle
transition was attempted ([before_destroy]) for component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myproject]] in state [STARTING_PREP] at
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:402)
at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1627)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1607)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1307)
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)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Jul 06, 2018 10:45:27 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].StandardContext[/myproject]] 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:911)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myproject]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
… 6 more Caused by:
org.apache.tomee.catalina.TomEERuntimeException:
javax.enterprise.inject.spi.DeploymentException: couldn’t start owb
context at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1310)
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:
javax.enterprise.inject.spi.DeploymentException: couldn’t start owb
context at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41) at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
… 11 more Caused by: org.apache.openejb.OpenEJBRuntimeException:
org.apache.webbeans.exception.WebBeansDeploymentException: WebBeans
configuration defined in
jar:file:/home/xxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar!/META-INF/beans.xml
did fail. Reason is : Interceptor class :
net.bull.javamelody.MonitoringAsynchronousCdiInterceptor must have at
least one @InterceptorBinding at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
… 15 more Caused by:
org.apache.webbeans.exception.WebBeansDeploymentException: WebBeans
configuration defined in
jar:file:/home/xxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar!/META-INF/beans.xml
did fail. Reason is : Interceptor class :
net.bull.javamelody.MonitoringAsynchronousCdiInterceptor must have at
least one @InterceptorBinding at
org.apache.webbeans.config.BeansDeployer.configureInterceptors(BeansDeployer.java:1464)
at
org.apache.webbeans.config.BeansDeployer.deployFromXML(BeansDeployer.java:1338)
at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:256)
at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
… 16 more

Jul 06, 2018 10:45:27 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:911)
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:791)
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:1403)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.apache.catalina.LifecycleException: A child container failed
during start at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 6 more

Jul 06, 2018 10:45:27 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: The required Server component failed to start so Tomcat is
unable to start. org.apache.catalina.LifecycleException: Failed to
start component [StandardServer[8005]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
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
[StandardService[Catalina]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 7 more Caused by: org.apache.catalina.LifecycleException: Failed
to start component [StandardEngine[Catalina]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 9 more Caused by: org.apache.catalina.LifecycleException: A child
container failed during start at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 11 more

2

Answers


  1. Try to provide interceptors in your beans.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
                               http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
           bean-discovery-mode="annotated">
    
      <interceptors>
        <class>net.bull.javamelody.MonitoringCdiInterceptor</class>
        <class>net.bull.javamelody.MonitoringAsynchronousCdiInterceptor</class>
      </interceptors>
    </beans>
    
    Login or Signup to reply.
  2. This is an issue #802 of javamelody with OpenEJB like in TomEE.
    The issue is fixed for the next version (1.76) to be released in a few months.

    Meanwhile you may workaround the issue by adding a file WEB-INF/exclusions.list in your webapp with the following content:

    # inherit from defaults, this is important to keep it
    default-list
    # ignore javamelody interceptors
    javamelody-core-1.73.1.jar
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search