尝试在WebSphere中运行应用程序时出错

时间:2017-07-14 11:12:32

标签: jsf websphere

Exception Error Page

SRVE0260E: 
The server can not use the error page specified for your application to handle the original exception printed below.


Exception:

Message d''erreur: java.lang.NoSuchMethodError: javax/faces/application/Application.subscribeToEvent(Ljava/lang/Class;Ljavax/faces/event/SystemEventListener;)V
Code d'erreur: 500
Servlet cible: 
Pile d'erreur: 
java.lang.NoSuchMethodError: javax/faces/application/Application.subscribeToEvent(Ljava/lang/Class;Ljavax/faces/event/SystemEventListener;)V 
     at org.omnifaces.util.Events.subscribeToEvent(Events.java:171) 
     at org.omnifaces.eventlistener.InvokeActionEventListener.<init>(InvokeActionEventListener.java:65) 
     at java.lang.J9VMInternals.newInstanceImpl(Native Method) 
     at java.lang.Class.newInstance(Class.java:1549) 
     at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:302) 
     at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:267) 
     at org.apache.myfaces.config.FacesConfigurator.configureLifecycle(FacesConfigurator.java:888) 
     at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:279) 
     at org.apache.myfaces.config.FacesConfigurator.update(FacesConfigurator.java:223) 
     at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:72) 
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:149) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1667) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:944) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:507) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) 
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:374) 
     at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:828) 
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3954) 
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) 
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:945) 
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) 
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) 
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1660) 

1 个答案:

答案 0 :(得分:3)

问题是MyFaces版本与应用程序和服务器中的JSF API不匹配。如果您打算在应用程序中使用自己的JSF实现,请确保在应用程序或共享库中包含实现和API,并确保它使用PARENT_LAST或隔离的类加载器。

如果您依赖于WebSphere的实现,请仔细检查您是否在应用程序配置中选择了适当的版本(实际上更改了服务器上的设置) - 在某些版本的服务器中,您可以更改实现您正在使用的JSF,它将从哪个服务器库中获取类。