jgritman/httpbuilder

java.lang.NoClassDefFoundError: oauth/signpost/exception/OAuthException

willis7 opened this issue · 1 comments

I have just tried to run a fairly simple application, and was presented with the following:

java.lang.NoClassDefFoundError: oauth/signpost/exception/OAuthException

    at groovyx.net.http.AuthConfig.oauth(AuthConfig.java:180)
    at io.byteshifter.plutora.rest.PlutoraRestClient.setOauth(PlutoraRestClient.groovy:68)
    at io.byteshifter.plutora.rest.PlutoraRestClient.executeRequest(PlutoraRestClient.groovy:88)
    at io.byteshifter.plutora.rest.PlutoraRestClientIntegSpec.OAuth works properly(PlutoraRestClientIntegSpec.groovy:75)
Caused by: java.lang.ClassNotFoundException: oauth.signpost.exception.OAuthException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 4 more

I have tried adding the signpost jar as a dependency using:
compile 'oauth.signpost:oauth-signpost:1.2.1.2'
I could see it wasn't being pulled in transitively. I'm all out of options now though.

Managed to fix the issue by also adding:
compile 'oauth.signpost:signpost-commonshttp4:1.2.1.2'