File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Instantiating a new jacksonFactory object causes exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Instantiating a new jacksonFactory object causes exception" Watch "Instantiating a new jacksonFactory object causes exception" New topic
Author

Instantiating a new jacksonFactory object causes exception

Sandy Marar
Greenhorn

Joined: Dec 22, 2011
Posts: 16
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

Joined: Oct 27, 2005
Posts: 19670
    
  18

Did you include the JAR file that contains that file in your class path?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Sandy Marar
Greenhorn

Joined: Dec 22, 2011
Posts: 16
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Instantiating a new jacksonFactory object causes exception