0
I have created a Spring Starter data jpa project and its connecting with mysql. through STS its running fine. 

i wanted to deploy it individually so i clean install the application using maven and used java jar <jarfile.jar> in command prompt.

I followed the video of java brains.

Below is the error which getenter image description here enter image description here

Kathiresan. N
  • 48
  • 1
  • 12
  • possible duplicate of https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j – dan1st Jun 05 '19 at 16:37

1 Answers1

0

JAXB is not found.

It seems that you set the scope of the JAXB dependency to provided or built the project for an old Java Version (like Java 8) that comes with JAXB and run it with a newer Java version (like Java 10) that does not come with JAXB.

You can fix this by adding the JAXB dependency to the classpath when running the JAR or by adding the dependency to your project manually(or set the scope to compile)

dan1st
  • 12,568
  • 8
  • 34
  • 67
  • hi @dan 1st --- project is spring boot and i haven't used any jaxb, more over i have used only java 10 in my proj...path or build path every where it refers java 10 only – Kathiresan. N Jun 06 '19 at 04:44
  • Maybe a library is using JAXB. Try to add it to the classpath manually. – dan1st Jun 06 '19 at 04:46
  • done ,its working, thanks. i need to find out which library and why it triggers entity manager bean object not created – Kathiresan. N Jun 06 '19 at 05:13
  • If it worked for you, I would appreciate if you accept my answer. – dan1st Jun 06 '19 at 05:14