SX Spring Security Extension
  1. SX Spring Security Extension
  2. SES-29

java.lang.NoSuchMethodError in constructor of KerberosServiceRequestToken

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: krb-1.0.0.M1
    • Fix Version/s: krb-1.0.0.M2
    • Component/s: kerberos
    • Labels:
      None
    • Environment:
      Windows 7
      Windows 2008 R2

      Description

      I don't have a clue why this happens, but i get the following NoSuchMethodError on the server and on my dev machine:

      java.lang.NoSuchMethodError: org.springframework.security.authentication.AbstractAuthenticationToken.<init>(Ljava/util/List;)V
      org.springframework.security.extensions.kerberos.KerberosServiceRequestToken.<init>(KerberosServiceRequestToken.java:69)
      org.springframework.security.extensions.kerberos.web.SpnegoAuthenticationProcessingFilter.doFilter(SpnegoAuthenticationProcessingFilter.java:114)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
      [...]

      I tried M1 and latest subversion together with the 3.0.0.RELEASE version of Spring Security from the Spring Repository.

      After changing super(null); to super(Collections.<GrantedAuthority>emptyList()); in line 69 the exception was gone.

        Activity

        Hide
        Arve Klev added a comment -

        To use SX Spring Security Extension version 1.0.0.M1, my experience is:

        • In the security.xml: ".../spring-security-3.0.xsd" says "BASIC_PROCESSING_FILTER" is not valid, but ".../spring-security-2.5.xsd" says it is.
        • Spring security version 3.0.1 gives me "java.lang.NoSuchMethodError in constructor of KerberosServiceRequestToken" as Harald Radi (https://jira.springsource.org/browse/SES-29) experienced.
          • To define authorities: Collection<GrantedAuthority> authorities = AuthorityUtils.createAuthorityList("ROLE_USER");
        • Spring security version 3.0.0.M2 is OK combination.
          • To define authorities: List<GrantedAuthority> authorities = AuthorityUtils.createAuthorityList("ROLE_USER");

        sincerely, Arve Klev

        Show
        Arve Klev added a comment - To use SX Spring Security Extension version 1.0.0.M1, my experience is: In the security.xml: ".../spring-security-3.0.xsd" says "BASIC_PROCESSING_FILTER" is not valid, but ".../spring-security-2.5.xsd" says it is. Spring security version 3.0.1 gives me "java.lang.NoSuchMethodError in constructor of KerberosServiceRequestToken" as Harald Radi ( https://jira.springsource.org/browse/SES-29 ) experienced. To define authorities: Collection<GrantedAuthority> authorities = AuthorityUtils.createAuthorityList("ROLE_USER"); Spring security version 3.0.0.M2 is OK combination. To define authorities: List<GrantedAuthority> authorities = AuthorityUtils.createAuthorityList("ROLE_USER"); sincerely, Arve Klev
        Hide
        Mark Davidson added a comment -

        I think that this is the same issue that's affecting me. I get the following error:

        "org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 19 in XML document from ServletContext resource [/WEB-INF/spring/security-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'BASIC_PROCESSING_FILTER' is not facet-valid with respect to enumeration '[FIRST, CHANNEL_FILTER, CONCURRENT_SESSION_FILTER, SECURITY_CONTEXT_FILTER, LOGOUT_FILTER, X509_FILTER, PRE_AUTH_FILTER, CAS_FILTER, FORM_LOGIN_FILTER, OPENID_FILTER, BASIC_AUTH_FILTER, SERVLET_API_SUPPORT_FILTER, REMEMBER_ME_FILTER, ANONYMOUS_FILTER, EXCEPTION_TRANSLATION_FILTER, SESSION_MANAGEMENT_FILTER, FILTER_SECURITY_INTERCEPTOR, SWITCH_USER_FILTER, LAST]'. It must be a value from the enumeration."

        I'm currently using Spring Security 3.0.1 and Spring Security 1.0.0 M1 having followed the instructions at http://blog.springsource.com/2009/09/28/spring-security-kerberos/.

        Show
        Mark Davidson added a comment - I think that this is the same issue that's affecting me. I get the following error: "org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 19 in XML document from ServletContext resource [/WEB-INF/spring/security-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'BASIC_PROCESSING_FILTER' is not facet-valid with respect to enumeration ' [FIRST, CHANNEL_FILTER, CONCURRENT_SESSION_FILTER, SECURITY_CONTEXT_FILTER, LOGOUT_FILTER, X509_FILTER, PRE_AUTH_FILTER, CAS_FILTER, FORM_LOGIN_FILTER, OPENID_FILTER, BASIC_AUTH_FILTER, SERVLET_API_SUPPORT_FILTER, REMEMBER_ME_FILTER, ANONYMOUS_FILTER, EXCEPTION_TRANSLATION_FILTER, SESSION_MANAGEMENT_FILTER, FILTER_SECURITY_INTERCEPTOR, SWITCH_USER_FILTER, LAST] '. It must be a value from the enumeration." I'm currently using Spring Security 3.0.1 and Spring Security 1.0.0 M1 having followed the instructions at http://blog.springsource.com/2009/09/28/spring-security-kerberos/ .
        Hide
        Mark Davidson added a comment -

        Oops - meant Spring Security Kerberos Extension 1.0.0 M1.

        Show
        Mark Davidson added a comment - Oops - meant Spring Security Kerberos Extension 1.0.0 M1.
        Hide
        Luke Taylor added a comment -

        The 1.0.0.M1 release is unlikely to work against the final release. The current trunk is configured to build against 3.0.0, so you'd be best to pull down the source and build it. Hopefully Mike will get a chance to prepare another release soon.

        Show
        Luke Taylor added a comment - The 1.0.0.M1 release is unlikely to work against the final release. The current trunk is configured to build against 3.0.0, so you'd be best to pull down the source and build it. Hopefully Mike will get a chance to prepare another release soon.
        Hide
        Daniel Baktiar added a comment -

        I also experience the same problem with Mark Davidson, using the Spring Security RELEASE 3.0.5 against SES 1.0.0.M1.

        Show
        Daniel Baktiar added a comment - I also experience the same problem with Mark Davidson, using the Spring Security RELEASE 3.0.5 against SES 1.0.0.M1.

          People

          • Assignee:
            Mike Wiesner
            Reporter:
            Harald Radi
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: