Abhijith12 / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

java.lang.NoClassDefFoundError: oauth/signpost/signature/OAuthMessageSigner ? #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Downloaded the jar from the path, 
http://code.google.com/p/linkedin-j/downloads/list - (May 24) - 
linkedin-j-0.1-rc4.zip 
2. Inlcuded the jar in the class path and try to access the class in the jar.
3.

What is the expected output? What do you see instead?
The expected output is that the method has to run and gives the required 
objects.

 Exception in thread "main" java.lang.NoClassDefFoundError: oauth/signpost/signature/OAuthMessageSigner

What version of the product are you using? On what operating system?
The version downloaded is May24 the build. Working on Windows 2000 professional 
operating system.
Working wiuth Eclipse Ganymede. The jdk used is 1.6 version.

Please provide any additional information below.

I need the following to be printed.
            System.out.println("Request token: " + requestToken.getToken()); 
                System.out.println("Token secret: " + requestToken.getTokenSecret()); 
                System.out.println("Expiration time: " + requestToken.getExpirationTime()); 

Code:

// In consumerSecretValue & consumerKeyValue specified the key got from 
developer\apps.

            final String consumerKeyValue = "consumerKeyValue "; 
                final String consumerSecretValue = "consumerSecretValue "; 

                final LinkedInOAuthService oauthService =       LinkedInOAuthServiceFactory.getInstance().createLinkedInOAuthService(consumerKeyValue, consumerSecretValue); 

                LinkedInRequestToken requestToken = oauthService.getOAuthRequestToken();                  

                String authUrl = requestToken.getAuthorizationUrl(); 

                System.out.println("Request token: " + requestToken.getToken()); 
                System.out.println("Token secret: " + requestToken.getTokenSecret()); 
                System.out.println("Expiration time: " + requestToken.getExpirationTime()); 

Error:

Exception in thread "main" java.lang.NoClassDefFoundError: 
oauth/signpost/signature/OAuthMessageSigner

      at 
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceFactory.createLinke
dInOAuthService(LinkedInOAuthServiceFactory.j
ava:56)

      at 
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceFactory.createLinke
dInOAuthService(LinkedInOAuthServiceFactory.j
ava:44)

      at com.visiontss.linkedin.BasicAuthentication.main(BasicAuthentication.java:25)

Kindly help us to get rid of this issue. 

Original issue reported on code.google.com by sundari....@gmail.com on 22 Jun 2010 at 9:33

GoogleCodeExporter commented 8 years ago
You need signpost-core-1.2.1.1.jar and commons-codec-1.3.jar in classpath. 
These jars are in the lib directory of the distribution.

Let me know if you still run into issues.

Original comment by nabeelmukhtar on 22 Jun 2010 at 9:40

GoogleCodeExporter commented 8 years ago

I have mistakenly taken the jars from some other location.
Now the code is working fine 

Thanks for your kindly support.

Original comment by sundari....@gmail.com on 22 Jun 2010 at 12:18

GoogleCodeExporter commented 8 years ago

Original comment by nabeelmukhtar on 24 Jun 2010 at 2:59

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
in fact, I had this error as well. And both jars mentioned above were in 
classpath...

I could only fix it by changing the order of the referenced JARs to this:

linkedin-j.jar
commons-codec-1.3.jar
signpost-core-1.2.1.1.jar

any other order didn't work for me

Original comment by slin...@gmail.com on 3 Jun 2012 at 4:22

GoogleCodeExporter commented 8 years ago
I had the same error, fixing the import order to the above order fixed it. 
Thanks ;)

Original comment by mail.stefan.ek@gmail.com on 28 Aug 2012 at 11:22