java.lang.NoSuchMethodError: org.springframework.social.NotAuthorizedException: method <init>(Ljava/lang/String;)V not found

Spring JIRA | Thomas Land | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I am trying to authenticate against Facebook using an Authentication Token. If the token is incorrect, I get the error below. Looks like the NotAuthorizedException class is missing a constructor with a String argument: java.lang.NoSuchMethodError: org.springframework.social.NotAuthorizedException: method <init>(Ljava/lang/String;)V not found at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:105) at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:60) at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:588) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:546) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:517) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:255) at org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:165) at org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:50) at org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:46) at org.springframework.social.facebook.connect.FacebookAdapter.setConnectionValues(FacebookAdapter.java:42) at org.springframework.social.facebook.connect.FacebookAdapter.setConnectionValues(FacebookAdapter.java:30) at org.springframework.social.connect.support.AbstractConnection.setValues(AbstractConnection.java:174) at org.springframework.social.connect.support.AbstractConnection.initKey(AbstractConnection.java:137) at org.springframework.social.connect.support.OAuth2Connection.<init>(OAuth2Connection.java:75) at org.springframework.social.connect.support.OAuth2ConnectionFactory.createConnection(OAuth2ConnectionFactory.java:91) ..

    Spring JIRA | 3 years ago | Thomas Land
    java.lang.NoSuchMethodError: org.springframework.social.NotAuthorizedException: method <init>(Ljava/lang/String;)V not found
  2. 0

    I am trying to authenticate against Facebook using an Authentication Token. If the token is incorrect, I get the error below. Looks like the NotAuthorizedException class is missing a constructor with a String argument: java.lang.NoSuchMethodError: org.springframework.social.NotAuthorizedException: method <init>(Ljava/lang/String;)V not found at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:105) at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:60) at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:588) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:546) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:517) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:255) at org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:165) at org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:50) at org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:46) at org.springframework.social.facebook.connect.FacebookAdapter.setConnectionValues(FacebookAdapter.java:42) at org.springframework.social.facebook.connect.FacebookAdapter.setConnectionValues(FacebookAdapter.java:30) at org.springframework.social.connect.support.AbstractConnection.setValues(AbstractConnection.java:174) at org.springframework.social.connect.support.AbstractConnection.initKey(AbstractConnection.java:137) at org.springframework.social.connect.support.OAuth2Connection.<init>(OAuth2Connection.java:75) at org.springframework.social.connect.support.OAuth2ConnectionFactory.createConnection(OAuth2ConnectionFactory.java:91) ..

    Spring JIRA | 3 years ago | Thomas Land
    java.lang.NoSuchMethodError: org.springframework.social.NotAuthorizedException: method <init>(Ljava/lang/String;)V not found
  3. 0

    I am using Spring Social framework .Getting org.springframework.social.MissingAuthorizationException with Proper access token

    Stack Overflow | 2 years ago
    java.lang.NoSuchMethodError: org.springframework.social.MissingAuthorizationException: method <init>(Ljava/lang/String;)V not found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.social.NotAuthorizedException: method <init>(Ljava/lang/String;)V not found

      at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError()
    2. Facebook API
      FacebookErrorHandler.handleError
      1. org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:105)
      2. org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:60)
      2 frames
    3. Spring
      RestTemplate.getForObject
      1. org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:588)
      2. org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:546)
      3. org.springframework.web.client.RestTemplate.execute(RestTemplate.java:517)
      4. org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:255)
      4 frames
    4. Facebook API
      FacebookAdapter.setConnectionValues
      1. org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:165)
      2. org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:50)
      3. org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:46)
      4. org.springframework.social.facebook.connect.FacebookAdapter.setConnectionValues(FacebookAdapter.java:42)
      5. org.springframework.social.facebook.connect.FacebookAdapter.setConnectionValues(FacebookAdapter.java:30)
      5 frames
    5. Foundational module containing the ServiceProvider Connect Framework and Service API invocation support.
      OAuth2ConnectionFactory.createConnection
      1. org.springframework.social.connect.support.AbstractConnection.setValues(AbstractConnection.java:174)
      2. org.springframework.social.connect.support.AbstractConnection.initKey(AbstractConnection.java:137)
      3. org.springframework.social.connect.support.OAuth2Connection.<init>(OAuth2Connection.java:75)
      4. org.springframework.social.connect.support.OAuth2ConnectionFactory.createConnection(OAuth2ConnectionFactory.java:91)
      4 frames