在尝试通过url访问我的应用程序时,我一直收到此异常。相同的配置与我的一所大学完美配合。
以下是我在应用程序中的一些配置:
面-config.xml中
<factory>
<exception-handler-factory>org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory</exception-handler-factory>
的web.xml
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/logout.xhtml</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/errorGeneral.xhtml</location>
</error-page>
<error-page>
<error-code>404</error-code> <!-- Not Found -->
<location>/errorGeneral.xhtml</location>
</error-page>
<error-page>
<error-code>408</error-code> <!-- Timeout -->
<location>/logout.xhtml</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/errorGeneral.xhtml</location> <!-- Internal Server Error -->
</error-page>
这里是异常的完整堆栈:
异常
Excepción de página de errores
SRVE0260E: El servidor no puede utilizar la página de error especificada para que la aplicación gestione la excepción original que se muestra a continuación.
Excepción original:
Mensaje de error: javax.servlet.ServletException: SRVE0207E: Excepción de inicialización no obtenida creada por el servlet
Código de error: 500
Servlet de destino: Faces Servlet
Pila de errores:
java.lang.IllegalArgumentException: Class org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory is no javax.faces.context.ExceptionHandlerFactory
at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:320)
at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:286)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:191)
at org.apache.myfaces.context.FacesContextFactoryImpl.<init>(FacesContextFactoryImpl.java:120)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1549)
at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:326)
at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:286)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:191)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:112)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:363)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:171)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:744)
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.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)
我正在努力:
Websphere 7 RAD 9.1.1 JDK 8。
关于我的问题是什么想法?
感谢。
答案 0 :(得分:-1)
看起来你的应用程序正在选择两个独立的JSF实现 - 当然,异常中有OmniFaces类,但MyFaces出现在堆栈中(很可能是由服务器加载的)。
最简单的答案就是从应用程序中删除JSF内容并依赖服务器中打包的版本 - 如果没有多个实现,则无法实现多个实现之间的冲突。如果您特别依赖于OmniFaces,那么您需要确保在应用程序中包含完整的API +实现,使用PARENT_LAST类加载(或隔离的共享库),并消除对MyFaces的任何引用从您的应用程序代码和构建工件实现。