- changed status to open
OAuth2 SDK 5.8 - AuthorizationCodeGrant imports org.apache.common.lang.StringUtils while rest project depends on lang3
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)
-
-
reporter As workaround, I added dependency to commons-lang:commons-lang:2.6 and seems to be working
-
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.
-
Fixed in df9edb1.
-
- changed status to resolved
The fix was released as v5.8.1 to Maven Central:
http://search.maven.org/#artifactdetails%7Ccom.nimbusds%7Coauth2-oidc-sdk%7C5.8.1%7Cjar
Happy coding!:)
-
reporter Thanks a lot. It works.
- Log in to comment
Thanks Sergey for pointing this out, it will definitely need a fix.