NullPointerException at com.sun.faces.application.view.FaceletViewHandlingStrategy.createView

≡放荡痞女 提交于 2019-12-02 08:53:53

Solved by removing the jsf-api-2.2.2.jar and jsf-impl-2.2.2.jar

and using javax.faces-2.0.10.jar and jboss-el-2.0.0.GA.jar

JSF 2.2 requires at least Servlet 3.0. Reading the definition of your web.xml i see you're still using Servlet 2.5. Change your first line with

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

And your faces-config definition should be like

<faces-config version="2.2"
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/web-facesconfig_2_2.xsd">

WebSphere Application Server 8.5 using MyFaces JSF Implementation by default. There is article in IBM Documentation how to use different JSF implementations.

Also faced with same error during migration Struts 1 -> JSF 2.2 It was occurred by ViewHandlerImpl of struts-faces (1.3.8). Looks like this lib is incompatible with Servlet 3 (which is required by JSF 2.2)

PS: Was working with JSF 2.0 without any changes.

So I can suggest to check all 3rd part filters etc., which can be involved to request processing.

Note for Author, please, pay attention to your code in:

com.filenet.ae.toolkit.server.servlet.filter.SecurityPluginFilter
...
com.filenet.ae.toolkit.server.servlet.filter.ThreadLocalCleanupFilter
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!