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

前端 未结 4 704
臣服心动
臣服心动 2021-01-26 12:52

i am trying to upgrade from jsf 1.2 to jsf 2.2.2 on websphere 8.5.1 and what i did is as follows:

1- put jsf-api-2.2.2.jar and jsf-impl-2.2.2.ja

相关标签:
4条回答
  • 2021-01-26 13:26

    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

    0 讨论(0)
  • 2021-01-26 13:31

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

    0 讨论(0)
  • 2021-01-26 13:39

    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
    
    0 讨论(0)
  • 2021-01-26 13:42

    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">
    
    0 讨论(0)
提交回复
热议问题