1

I am getting following error while running build.

Log:-
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/xml/bind/v2/model/annotation/AnnotationReader
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)

Can you please help me resolving this issue. I found some reference which didnt help me. I kept the jar files which has above class in Classpath. Still facing the same issue.

santosh
  • 421
  • 1
  • 6
  • 14
  • 2
    Possible duplicate of [Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.model.annotation.AnnotationReader](https://stackoverflow.com/questions/36557308/caused-by-java-lang-classnotfoundexception-com-sun-xml-bind-v2-model-annotatio) – Leonardo Oct 18 '18 at 10:49
  • Its saying 'you need to simply use below maven dependencies:' Mine is not a maven project. When i try to run java command i am hitting above issue. – santosh Oct 18 '18 at 10:56
  • Then you must add these dependencies manually on the classpath. – Benoit Oct 18 '18 at 11:51

0 Answers0