Getting following exception when adding composite component programmatically
java.lang.NullPointerException: null
at com.sun.faces.application.view.FaceletViewHandlingStrategy.getComponentMetadata(FaceletViewHandlingStrategy.java:220) ~[javax.faces.jar:2.1.6-SNAPSHOT]
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:938) ~[javax.faces.jar:2.1.6-SNAPSHOT]
at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:605) ~[javax.faces.jar:2.1.6-SNAPSHOT]
at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:605) ~[javax.faces.jar:2.1.6-SNAPSHOT]
at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:605) ~[javax.faces.jar:2.1.6-SNAPSHOT]
at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:605) ~[javax.faces.jar:2.1.6-SNAPSHOT]
at org.omnifaces.util.Components.includeCompositeComponent(Components.java:320) ~[omnifaces-1.6.jar:1.6]
Components.includeCompositeComponent(form,
"ccomp", "ccomponent.xhtml", "ccomponentId");
NPE does not appear when javax.faces.PARTIAL_STATE_SAVING = true
. But when true
, getting duplicate id errors in other places.
How to resolve this?