1

I get this error after creating entity. Here is my log:

2021-01-12 11:56:39.828 DEBUG 9424 --- [  restartedMain] c.e.c.E.domain.User.authorities          : Close successful.
2021-01-12 11:56:39.875 ERROR 9424 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: jdk11.domain.Libro.scritto in jdk11.domain.Scritto.libros
       
Caused by: org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: jdk11.domain.Libro.scritto in jdk11.domain.Scritto.libros
    

How can i solve? I have already checked the entity names.

cat
  • 11
  • 1
  • It looks like you're using a JDK I'm not familiar with. Can you try it with OpenJDK? – Matt Raible Jan 12 '21 at 16:29
  • I have java version "11.0.9" 2020-10-20 LTS – cat Jan 13 '21 at 09:43
  • That's not the same as OpenJDK. What's the output when you run "java --version"? Mine is: openjdk 11.0.8 2020-07-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode) – Matt Raible Jan 14 '21 at 23:41
  • Sorry if I answer only now. I run java --version and it comes out this: java 11.0.9 2020-10-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.9+7-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.9+7-LTS, mixed mode) – cat Jan 28 '21 at 10:51

0 Answers0