JavaMelody throws WebBeansDeploymentException



晚上好,

我想监视我的网络应用程序并了解javamelody的易用性。从文档中可以很容易地将javamelody和jrobin复制到webapp的WEB-INF/lib中,然后重新启动tomcat。

但是当我在我的WEB-INF/lib中启动tomcat时,我得到了一个WebBeansDeploymentException:javamelody-core-1.73.1.jar,jrobin-1.5.9.jar

我使用的是openJPA,我的beans.xml文件是空的,但确实存在。

我的配置:

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

由于我在stackoverflow或谷歌上没有发现太多关于这个问题的信息,我将感谢任何提示或链接以供进一步阅读!

提前感谢!

完整堆栈跟踪:

2018年7月6日下午10:45:27 org.apache.openjb.cdi.OpenEJBLifecyclestartApplication SEVERE:CDI Beans模块部署失败org.apache.webbeans.exception.WebBeansDeploymentException:webbeans中定义的配置jar:文件:/home/xxxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar/META-INF/beans.xml确实失败了。原因是:拦截器类:net.bull.javamelody.MonitoringAsynchronousCdiInterceptor必须具有至少有一个@InterceptorBinding位于org.apache.webbean.config.BeansDeployer.configureInterceptors(BeansDeployr.java:1464)在org.apache.webbean.config.BeansDeployFromXML(BeansDeployer.java:1338)在org.apache.webbean.config.BeansDeployer.deploy(BeansDeployr.java:256)在org.apache.openjb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)在org.apache.openejb.cdi.ThreadSingle ServiceImpl.initialize(ThreadSingle Serviceimpl.java:189)网址:org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)org.apache.openejb.assembler.classic.assembler.createApplication(汇编程序.java:913)在org.apache.openejb.assembler.classic.assembler.createApplication(汇编程序.java:717)在org.apache.omee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)在org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)在org.apache.omee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)在org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)位于java.util.concurrent.FFutureTask.run(FutureTask.java:266)java.util.concurrent.ThreadPoolExecutiator.runWorker(ThreadPoolExecutiator.java:1142)在java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)在java.lang.Thread.run(Thread.java:745)

2018年7月6日10:45:27下午org.apache.tome.catalina.TomcatWebAppBuilderstartInternal SEVERE:无法在战争中部署崩溃的耳朵StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myproject]javax.enterprise.inject.spi.DeploymentException:无法启动owb上下文位于org.apache.openejb.cdi.ThreadSingle ServiceImpl.initialize(ThreadSingle Serviceimpl.java:191)网址:org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)org.apache.openejb.assembler.classic.assembler.createApplication(汇编程序.java:913)在org.apache.openejb.assembler.classic.assembler.createApplication(汇编程序.java:717)在org.apache.omee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)在org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)在org.apache.omee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)在org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)位于java.util.concurrent.FFutureTask.run(FutureTask.java:266)java.util.concurrent.ThreadPoolExecutiator.runWorker(ThreadPoolExecutiator.java:1142)在java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)在java.lang.Thread.run(Thread.java:745)由以下原因引起:org.apache.openjb.OpenEJBRuntime异常:org.apache.webbeans.exception.webbeans部署异常:webbeans中定义的配置jar:文件:/home/xxxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar/META-INF/beans.xml确实失败了。原因是:拦截器类:net.bull.javamelody.MonitoringAsynchronousCdiInterceptor必须具有至少有一个@InterceptorBinding位于org.apache.openjb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)在org.apache.openejb.cdi.ThreadSingle ServiceImpl.initialize(ThreadSingle Serviceimpl.java:189)…15更多原因:org.apache.webbeans.exception.webbeans部署异常:webbeans中定义的配置jar:文件:/home/xxxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar/META-INF/beans.xml确实失败了。原因是:拦截器类:net.bull.javamelody.MonitoringAsynchronousCdiInterceptor必须具有至少有一个@InterceptorBinding位于org.apache.webbean.config.BeansDeployer.configureInterceptors(BeansDeployr.java:1464)在org.apache.webbean.config.BeansDeployFromXML(BeansDeployer.java:1338)在org.apache.webbean.config.BeansDeployer.deploy(BeansDeployr.java:256)在org.apache.openjb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)…还有16个

2018年7月6日上午10:45:27 sun.reflect.NativeMethodAccessorImpl调用严重:ContainerBase.removeChild:销毁:org.apache.catalina.LifecycleException:无效的生命周期已尝试对组件进行转换([before_destroy])[StandardEngine[Catalina].StandardHost[localhost].StandardsContext[/myproject]]处于[STARTING_PREP]状态org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:402)在org.apache.catalina.util.LifecycleBase.dedestroy(LifecycleBase.java:292)在org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)在org.apache.omee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1627)在org.apache.omee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1607)在org.apache.omee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1307)在org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)在org.apache.omee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)在org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)位于java.util.concurrent.FFutureTask.run(FutureTask.java:266)java.util.concurrent.ThreadPoolExecutiator.runWorker(ThreadPoolExecutiator.java:1142)在java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)在java.lang.Thread.run(Thread.java:745)

2018年7月6日上午10:45:27 sun.reflect.NativeMethodAccessorImpl调用严重:子容器在启动过程中失败java.util.courrent.ExecutionException:org.apache.catalina.LifecycleException:启动组件失败[StandardEngine[Catalina].StandardHost[localhost].StandardsContext[/myproject]]位于java.util.concurrent.FFutureTask.report(FutureTask.java:122)java.util.concurrent.FFutureTask.get(FutureTask.java:192)位于org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)在org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)位于java.util.concurrent.FFutureTask.run(FutureTask.java:266)java.util.concurrent.ThreadPoolExecutiator.runWorker(ThreadPoolExecutiator.java:1142)在java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)在java.lang.Thread.run(Thread.java:745)由以下原因引起:org.apache.catalina.LifecycleException:启动组件失败[StandardEngine[Catalina].StandardHost[localhost].StandardsContext[/myproject]]在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)…6更多原因:org.apache.tome.catalina.TomEEruntime异常:javax.enterprise.inject.spi.DeploymentException:无法启动owb上下文位于org.apache.omee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1310)在org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)在org.apache.omee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)在org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)…6更多原因:javax.enterprise.inject.spi.DeploymentException:无法启动owb上下文位于org.apache.openejb.cdi.ThreadSingle ServiceImpl.initialize(ThreadSingle Serviceimpl.java:191)网址:org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)org.apache.openejb.assembler.classic.assembler.createApplication(汇编程序.java:913)在org.apache.openejb.assembler.classic.assembler.createApplication(汇编程序.java:717)在org.apache.omee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)…还有11个原因:org.apache.openjb.OpenEJBRuntimeException:org.apache.webbeans.exception.webbeans部署异常:webbeans中定义的配置jar:文件:/home/xxxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar/META-INF/beans.xml确实失败了。原因是:拦截器类:net.bull.javamelody.MonitoringAsynchronousCdiInterceptor必须具有至少有一个@InterceptorBinding位于org.apache.openjb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)在org.apache.openejb.cdi.ThreadSingle ServiceImpl.initialize(ThreadSingle Serviceimpl.java:189)…15更多原因:org.apache.webbeans.exception.webbeans部署异常:webbeans中定义的配置jar:文件:/home/xxxxxxxx/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/WEB-INF/lib/javamelody-core-1.73.1.jar/META-INF/beans.xml确实失败了。原因是:拦截器类:net.bull.javamelody.MonitoringAsynchronousCdiInterceptor必须具有至少有一个@InterceptorBinding位于org.apache.webbean.config.BeansDeployer.configureInterceptors(BeansDeployr.java:1464)在org.apache.webbean.config.BeansDeployFromXML(BeansDeployer.java:1338)在org.apache.webbean.config.BeansDeployer.deploy(BeansDeployr.java:256)在org.apache.openjb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)…还有16个

2018年7月6日上午10:45:27 sun.reflect.NativeMethodAccessorImpl调用严重:子容器在启动过程中失败java.util.courrent.ExecutionException:org.apache.catalina.LifecycleException:启动组件失败[StandardEngine[Catalina].StandardHost[localhost]]位于java.util.concurrent.FFutureTask.report(FutureTask.java:122)位于java.util.concurrent.FFutureTask.get(FutureTask.java:192)位于org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)在org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)在org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)在org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)网址:org.apache.catalina.startup.catalina.start(catalina.java:655)位于的sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:498)org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)引起发件人:org.apache.catalina.LifecycleException:启动组件失败[StandardEngine[Catalina].StandardHost[localhost]]位于org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)位于java.util.concurrent.FFutureTask.run(FutureTask.java:266)java.util.concurrent.ThreadPoolExecutiator.runWorker(ThreadPoolExecutiator.java:1142)在java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)在java.lang.Thread.run(Thread.java:745)由以下原因引起:org.apache.catalina.LifecycleException:子容器失败在启动期间org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)在org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)…还有6个

2018年7月6日上午10:45:27 sun.reflect.NativeMethodAccessorImpl调用严重:所需的服务器组件无法启动,因此Tomcat无法启动。org.apache.catalina.LifecycleException:未能在启动组件[StandardServer[8005]]org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)网址:org.apache.catalina.startup.catalina.start(catalina.java:655)位于的sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.lang.reflect.Method.ioke(Method.java:498)org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)引起发件人:org.apache.catalina.LifecycleException:启动组件失败[StandardService[Catalina]]org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)在org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)…还有7个原因:org.apache.catalina.LifecycleException:失败在启动组件[StandardEngine[Catalina]]org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)在org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)…9更多原因:org.apache.catalina.LifecycleException:一个孩子容器在启动时失败org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)在org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)…还有11个

尝试在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>

这是类似于TomEE中OpenEJB的javamelody的问题#802。该问题已修复,下一个版本(1.76)将在几个月后发布。

同时,你可以通过在你的网络应用程序中添加一个文件WEB-INF/exclusions.list来解决这个问题,该文件包含以下内容:

# inherit from defaults, this is important to keep it
default-list
# ignore javamelody interceptors
javamelody-core-1.73.1.jar

相关内容

  • 没有找到相关文章

最新更新