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

白昼怎懂夜的黑 提交于 2019-12-02 21:50:40
Scary Wombat

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".

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.

user1553728

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.

Kelson Anthony de Menezes

Please try setting the following:

<context-param>  
    <param-name>primefaces.THEME</param-name>  
    <param-value>blitzer</param-value>  
</context-param>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!