java.lang.NoSuchMethodError: org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V

Spring JIRA | Christian Kleinewächter | 2 years ago
  1. 0

    NoSuchMethodError: FaceletsAuthorizeTag.setIfAllGranted

    Stack Overflow | 2 years ago | bwright
    java.lang.NoSuchMethodError: org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V
  2. 0

    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}

    Spring JIRA | 2 years ago | Christian Kleinewächter
    java.lang.NoSuchMethodError: org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V
  3. 0

    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}

    Spring JIRA | 2 years ago | Christian Kleinewächter
    java.lang.NoSuchMethodError: org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SeLion unable to launch hub/node with runLocally=true

    Google Groups | 1 year ago | Sudhakara Reddy Peram
    java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.setCharacterEncoding(Ljava/lang/String;)V
  6. 0

    I am getting error while integrating FreeTTS for text to speech in android

    Stack Overflow | 4 weeks ago | Allu
    java.lang.NoSuchMethodError: com.sun.speech.freetts.Voice.log(Ljava/lang/String;)V

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.faces.security.FaceletsAuthorizeTag.setIfAllGranted(Ljava/lang/String;)V

      at org.springframework.faces.security.FaceletsAuthorizeTag.<init>()
    2. org.springframework.faces
      FaceletsAuthorizeTagHandler.apply
      1. org.springframework.faces.security.FaceletsAuthorizeTag.<init>(FaceletsAuthorizeTag.java:55)
      2. org.springframework.faces.security.FaceletsAuthorizeTagHandler.apply(FaceletsAuthorizeTagHandler.java:74)
      2 frames
    3. JavaEE 7
      DelegatingMetaTagHandler.applyNextHandler
      1. javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      2. javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
      2 frames
    4. JSF
      ComponentTagHandlerDelegateImpl.apply
      1. com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203)
      1 frame
    5. JavaEE 7
      DelegatingMetaTagHandler.applyNextHandler
      1. javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
      2. javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
      2 frames