Hi, I'm new to the environment and I'm trying to run the example code
of jumbrl.
the code is:
package tumblr;
import com.tumblr.jumblr.*;
import com.tumblr.jumblr.types.Blog;
import com.tumblr.jumblr.types.User;
/**
*
* @author Pask
*/
public class Tumblr {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
JumblrClient client = new JumblrClient([oauth key], [oauth
secret] );
client.setToken([oauth token], [oauth token secret]);
// Write the user's name
User user = client.user(); //<--error happens here
System.out.println(user.getName());
by running it i get the error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
commons/codec/binary/Base64
at
org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:
47)
at
org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:
33)
at
org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:
99)
at
org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:
53)
at
org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:
76)
at com.tumblr.jumblr.request.RequestBuilder.sign(RequestBuilder.java:
126)
at com.tumblr.jumblr.request.RequestBuilder.get(RequestBuilder.java:
68)
at com.tumblr.jumblr.JumblrClient.user(JumblrClient.java:64)
at tumblr.Tumblr.main(Tumblr.java:23)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.codec.binary.Base64
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 9 more
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
I don't really know what I'm doing wrong, I got the codes with the
procedure described here:
https://groups.google.com/group/tumblr-api/browse_thread/thread/2c857d17c8868159