1
XMLSerializer xmlSerializer = new XMLSerializer(); 
        JSON json  = xmlSerializer.read( xmlString );  
        System.out.println( json.toString(2) );


Exception in thread "main" java.lang.NoClassDefFoundError: nu/xom/Serializer
    at src.main.parser.main(parser.java:19)
Caused by: java.lang.ClassNotFoundException: nu.xom.Serializer
    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)
... 1 more

While i am coverting from XML to Json i got this error ...?

How can i fix this one .

Thanks Sankar

1
  • Check if the xom jar is in your classpath. Commented Aug 29, 2013 at 11:09

2 Answers 2

6

Download xom jar and add to your class path: http://www.findjar.com/jar/xom/xom/1.0/xom-1.0.jar.html

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your link , i downloaded the xom jar and its working fine .
1

You need to add the library containing the nu.xom.Serializer class to your classpath.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.