OAuth2 SDK 5.8 - AuthorizationCodeGrant imports org.apache.common.lang.StringUtils while rest project depends on lang3

Issue #179 resolved
Sergey Akhapkin created an issue

I upgraded to latest 5.8 version of SDK and got runtime error:

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at com.nimbusds.oauth2.sdk.AuthorizationCodeGrant.parse(AuthorizationCodeGrant.java:238) at com.nimbusds.oauth2.sdk.AuthorizationGrant.parse(AuthorizationGrant.java:93) at com.nimbusds.oauth2.sdk.TokenRequest.parse(TokenRequest.java:405)

I see that AuthorizationCodeGrant (since commit 5357cbe) imports

+import org.apache.commons.lang.StringUtils;

while all other sources and pom.xml contains dependency to commons.lang3

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.4</version>
    </dependency>

Does not look to be right.

Comments (6)

  1. Sergey Akhapkin reporter

    As workaround, I added dependency to commons-lang:commons-lang:2.6 and seems to be working

  2. Vladimir Dzhuvinov

    It looks like this was picked up by accident by the opensaml dependency. lang3 is the correct import here. Stay tuned for an update tomorrow.

  3. Log in to comment