java.lang.ClassCastException: com.sun.faces.facelets.compiler.UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement

后端 未结 4 927
野的像风
野的像风 2021-02-01 20:12

This morning I came in to my office and the first thing I saw: my company site crashed. Because of me I think.

Now I tried for one hour and a half to fix this, but I fou

相关标签:
4条回答
  • 2021-02-01 20:20

    Just add this to your web.xml:

    <context-param>
        <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
        <param-value>true</param-value>
    </context-param>
    

    It will skip the comments in your JSF while rendering.

    As of JSF1025, facelets.SKIP_COMMENTS has been deprecated.

    0 讨论(0)
  • 2021-02-01 20:25

    Just add this to your web.xml:

    <context-param>
       <param-name>facelets.SKIP_COMMENTS</param-name>
       <param-value>true</param-value>
    </context-param>
    

    It will skip the comments in your JSF while rendering.

    0 讨论(0)
  • 2021-02-01 20:28

    Please try setting the following:

    <context-param>  
        <param-name>primefaces.THEME</param-name>  
        <param-value>blitzer</param-value>  
    </context-param>
    
    0 讨论(0)
  • 2021-02-01 20:35

    A quick google of the error message shows

    PanelMenu can't be rendered when it's sub elements contain comments. a html alert dialog will be shown on which written "UI Layout Initialization Error..." and on the server an exception is thrown "java.lang.ClassCastException:com.sun.faces.facelets.compiler.UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement".

    0 讨论(0)
提交回复
热议问题