我一直在研究maven项目,在几天(约15)分钟不活动后,Tomcat日志会吐出以下内容:
14:05:36.155 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR org.jboss.weld.Bean - WELD-000019: Error destroying an instance null of Managed Bean [class foo.Bar] with qualifiers [@Default @Any @Named]
14:05:36.155 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG org.jboss.weld.Bean - Catching
org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void foo.Bar.destroy() on null
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100) ~[weld-servlet-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.preDestroy(DefaultLifecycleCallbackInvoker.java:91) ~[weld-servlet-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.weld.injection.producer.BasicInjectionTarget.preDestroy(BasicInjectionTarget.java:131) ~[weld-servlet-2.3.1.Final.jar:2.3.1.Final]
at org.jboss.weld.bean.ManagedBean.destroy(ManagedBean.java:189) [weld-servlet-2.3.1.Final.jar:2.3.1.Final]
at com.sun.faces.application.view.ViewScopeContextManager.destroyBeans(ViewScopeContextManager.java:177) [javax.faces-2.2.13.jar:2.2.13]
at com.sun.faces.application.view.ViewScopeContextManager.sessionDestroyed(ViewScopeContextManager.java:339) [javax.faces-2.2.13.jar:2.2.13]
at com.sun.faces.application.view.ViewScopeManager.sessionDestroyed(ViewScopeManager.java:369) [javax.faces-2.2.13.jar:2.2.13]
at com.sun.faces.application.WebappLifecycleListener.sessionDestroyed(WebappLifecycleListener.java:199) [javax.faces-2.2.13.jar:2.2.13]
at com.sun.faces.config.ConfigureListener.sessionDestroyed(ConfigureListener.java:407) [javax.faces-2.2.13.jar:2.2.13]
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:839) [catalina.jar:8.0.27]
at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:697) [catalina.jar:8.0.27]
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:570) [catalina.jar:8.0.27]
at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:555) [catalina.jar:8.0.27]
at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5551) [catalina.jar:8.0.27]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1377) [catalina.jar:8.0.27]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381) [catalina.jar:8.0.27]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381) [catalina.jar:8.0.27]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1349) [catalina.jar:8.0.27]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77]
Caused by: java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98) ~[weld-servlet-2.3.1.Final.jar:2.3.1.Final]
... 18 more
我做了一些谷歌搜索,但我不知道这意味着什么,或者是什么造成了它。类foo.Bar
确实有一个有效的destroy()
方法。任何人都知道该做什么/从哪里开始寻找?谢谢!