• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Instantiating a new jacksonFactory object causes exception

 
Sandy Marar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the exception that occurs when i try to instantiate a new JacksonFactory object (JacksonFactory jacksonFactory = new JacksonFactory();).What could have been the cause of this exception?How can i resolve it?


Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jackson/JsonFactory
at com.google.api.client.json.jackson.JacksonFactory.<init>(JacksonFactory.java:43)
at com.test.youtube.OAuth2.main(OAuth2.java:18)
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.JsonFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 2 more
 
Rob Spoor
Sheriff
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you include the JAR file that contains that file in your class path?
 
Sandy Marar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah I had missed out a dependency jar file for the Json factory class.After adding it to the classpath the problem seemed to be solved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic