1

I'm new in JPA, and I keep getting error like this: enter image description here

Currently, I work with:

  • Java 8
  • Spring boot 2.1.4 Release
  • Hibernate 5.2.2 Finale
  • MySQL connector java 8.0.15
  • Gson 2.8.6

I'm seriously don't know what to do and what cause the error because, again, I'm new with JPA. Can anyone help me?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
mochim
  • 71
  • 1
  • 2
  • 9

2 Answers2

8

Seems you're not actually using Java 8. If you want to solve this for Java 11 or above, include these dependencies in your pom, as they're not part of the JDK anymore.

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
</dependency>
Sebastiaan van den Broek
  • 5,818
  • 7
  • 40
  • 73
0

In your error screenshot you have error regarding "java-15" path but you claim to be using java 8. I think you are actually using java 15 but don't realize it. Java 15 doesn't have that namespace.

If you intend to work with java 8, I suggest you install and use that one - that shouldn't give you the error you're now getting.

eis
  • 51,991
  • 13
  • 150
  • 199