java.lang.NoSuchMethodError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Using the sec:authorize tag from spring-faces 2.4.1 combined with spring-security 4.0.1 fails because the properties ifAnyGranted, ifAllGranted and ifNotGranted have been removed from spring-security. This happens even if these properties are not used: Example: {code} <sec:authorize access="hasRole('ROLE_FOO')" > <p:menuitem value="Protected" url="index.xhtml" icon="ui-icon-home" /> </sec:authorize> {code} leads to {code} java.lang.NoSuchMethodError: org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V at org.springframework.faces.security.FaceletsAuthorizeTag.<init>(FaceletsAuthorizeTag.java:55) at org.springframework.faces.security.FaceletsAuthorizeTagHandler.apply(FaceletsAuthorizeTagHandler.java:74) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) {code} This happens because the constructor calls the removed methods on the parent: {code} public FaceletsAuthorizeTag(FaceletContext faceletContext, TagAttribute access, TagAttribute url, TagAttribute method, TagAttribute ifAllGranted, TagAttribute ifAnyGranted, TagAttribute ifNotGranted) { ... setIfAllGranted(getAttributeValue(faceletContext, ifAllGranted, true)); setIfAnyGranted(getAttributeValue(faceletContext, ifAnyGranted, true)); setIfNotGranted(getAttributeValue(faceletContext, ifNotGranted, true)); } {code}
    via by Christian Kleinewächter,
  • Using the sec:authorize tag from spring-faces 2.4.1 combined with spring-security 4.0.1 fails because the properties ifAnyGranted, ifAllGranted and ifNotGranted have been removed from spring-security. This happens even if these properties are not used: Example: {code} <sec:authorize access="hasRole('ROLE_FOO')" > <p:menuitem value="Protected" url="index.xhtml" icon="ui-icon-home" /> </sec:authorize> {code} leads to {code} java.lang.NoSuchMethodError: org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V at org.springframework.faces.security.FaceletsAuthorizeTag.<init>(FaceletsAuthorizeTag.java:55) at org.springframework.faces.security.FaceletsAuthorizeTagHandler.apply(FaceletsAuthorizeTagHandler.java:74) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) {code} This happens because the constructor calls the removed methods on the parent: {code} public FaceletsAuthorizeTag(FaceletContext faceletContext, TagAttribute access, TagAttribute url, TagAttribute method, TagAttribute ifAllGranted, TagAttribute ifAnyGranted, TagAttribute ifNotGranted) { ... setIfAllGranted(getAttributeValue(faceletContext, ifAllGranted, true)); setIfAnyGranted(getAttributeValue(faceletContext, ifAnyGranted, true)); setIfNotGranted(getAttributeValue(faceletContext, ifNotGranted, true)); } {code}
    via by Christian Kleinewächter,
    • java.lang.NoSuchMethodError: org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V at org.springframework.faces.security.FaceletsAuthorizeTag.<init>(FaceletsAuthorizeTag.java:55) at org.springframework.faces.security.FaceletsAuthorizeTagHandler.apply(FaceletsAuthorizeTagHandler.java:74) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    No Bugmate found.