1
votes

I am trying to use the json-schema validator on the code given in this link using eclipse..

There is a main class which reads the two .json file(schema and json data) if (ValidationUtils.isJsonValid(schemaFile, jsonFile)) is used to validate them a ValidationUtils class which takes the schema file and the json file and validates it..

but i am getting the following errors.. and i donno how to fix it..plz help?

Exception in thread "main" java.lang.NoClassDefFoundError: com/github/fge/msgsimple/bundle/PropertiesBundle at com.github.fge.jackson.JsonNodeReader.(JsonNodeReader.java:66) at com.github.fge.jackson.JsonLoader.(JsonLoader.java:50) at com.wilddiary.json.ValidationUtils.getJsonNode(ValidationUtils.java:30) at com.wilddiary.json.ValidationUtils.getSchemaNode(ValidationUtils.java:55) at com.wilddiary.json.ValidationUtils.isJsonValid(ValidationUtils.java:99) at com.wilddiary.json.Main.main(Main.java:18) Caused by: java.lang.ClassNotFoundException: com.github.fge.msgsimple.bundle.PropertiesBundle at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 6 more

i'm using:

  • json-schema-validator-2.2.6
  • json-schema-core-1.2.5
  • jackson coreutils 1.8
  • jackson databind 2.7.2
  • jackson annotations 2.7.2
  • com.fasterxml.jackson.core.jar
1

1 Answers

0
votes

The exception implies that class com.github.fge.msgsimple.bundle.PropertiesBundle is not present on your run-time class-path. To fix this problem you should download msg-simple-0.9.jar (http://mvnrepository.com/artifact/com.github.fge/msg-simple/0.9) and put it into your class-path.