我使用的是primefaces 5.3版,但工作正常,但必须将其升级到6.0版才能使用更多组件。
许多错误开始发生,我回到5.3,但更多错误开始发生。尽管在此期间我做了一些更改,但我的应用程序中出现了一些错误,但是后来我尝试将primefaces依赖关系升级到最新版本6.2,许多错误停止发生,而我又回到了6.0版,发生了更多错误,更多错误比我第一次从5.3更改为6.0。
我相信素字对我的代码和版本的影响更大。
这是所有这些混乱之后我在5.3版时发生的错误:
25-Nov-2018 19:37:11.370 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 19:37:11.370 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Nov-2018 19:39:16.381 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Nov-2018 19:39:16.381 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Nov-2018 19:41:34.435 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 19:41:34.435 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Nov-2018 20:20:31.556 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Nov-2018 20:20:31.556 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Nov-2018 20:20:31.572 GRAVE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getCurrentInstance()Lorg/primefaces/context/ApplicationContext;
at org.primefaces.webapp.PreDestroyApplicationEventListener.processEvent(PreDestroyApplicationEventListener.java:30)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:352)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1435)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
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)
25-Nov-2018 20:20:47.479 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 20:20:47.479 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Nov-2018 20:22:24.606 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Nov-2018 20:22:24.610 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Nov-2018 20:22:24.615 GRAVE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getCurrentInstance()Lorg/primefaces/context/ApplicationContext;
at org.primefaces.webapp.PreDestroyApplicationEventListener.processEvent(PreDestroyApplicationEventListener.java:30)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:352)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1435)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
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)
25-Nov-2018 20:23:36.603 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 20:23:36.603 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Nov-2018 20:23:37.561 GRAVE [http-nio-8080-exec-5] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getCurrentInstance()Lorg/primefaces/context/ApplicationContext;
at org.primefaces.webapp.PreDestroyApplicationEventListener.processEvent(PreDestroyApplicationEventListener.java:30)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:352)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.manager.ManagerServlet.undeploy(ManagerServlet.java:1416)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:621)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
25-Nov-2018 20:30:34.081 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Nov-2018 20:30:34.081 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Nov-2018 20:30:34.097 GRAVE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getCurrentInstance()Lorg/primefaces/context/ApplicationContext;
at org.primefaces.webapp.PreDestroyApplicationEventListener.processEvent(PreDestroyApplicationEventListener.java:30)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:352)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1435)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
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)
25-Nov-2018 20:31:41.363 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 20:31:41.363 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Nov-2018 20:31:41.779 GRAVE [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getCurrentInstance()Lorg/primefaces/context/ApplicationContext;
at org.primefaces.webapp.PreDestroyApplicationEventListener.processEvent(PreDestroyApplicationEventListener.java:30)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:352)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.manager.ManagerServlet.undeploy(ManagerServlet.java:1416)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:621)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
25-Nov-2018 20:34:01.763 GRAVE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getCurrentInstance()Lorg/primefaces/context/ApplicationContext;
at org.primefaces.webapp.PreDestroyApplicationEventListener.processEvent(PreDestroyApplicationEventListener.java:30)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:352)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3793)
at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1411)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1384)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1620)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1164)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1388)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1392)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
25-Nov-2018 20:34:15.605 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Nov-2018 20:34:15.605 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Nov-2018 20:34:15.621 GRAVE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.NoSuchMethodError: org.primefaces.context.ApplicationContext.getCurrentInstance()Lorg/primefaces/context/ApplicationContext;
at org.primefaces.webapp.PreDestroyApplicationEventListener.processEvent(PreDestroyApplicationEventListener.java:30)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:294)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:352)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1435)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
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)
25-Nov-2018 20:36:12.923 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 20:36:12.923 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Nov-2018 21:07:16.650 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Nov-2018 21:07:16.650 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Nov-2018 21:07:32.253 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 21:07:32.253 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Nov-2018 21:08:05.328 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Nov-2018 21:08:05.328 INFORMAÇÕES [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Nov-2018 21:09:30.372 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Nov-2018 21:09:30.372 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
最佳答案
我以某种方式解决了该错误,但我不完全知道该怎么做,但我确实做到了。我简单地删除了(首先保存一个副本).m2目录,然后让netbeans再次创建它。
不幸的是,它不能很好地工作,然后我删除了这个新的.m2目录,并返回到我保存的副本。
它开始起作用。
就像我说的那样,我不知道为什么会这样。