My combination of is Spring Boot + Spring Data Jpa + Multiple Databases. I am getting following NullPointer exception when starting the application. Feels like SPring Data with
I faced the mentioned issue with mapping in OnetoOne relationship..
My app had the following OneToOne relationship.
A ||---|| B
B ||---|| C
Since its OnetoOne, I kept entity B primary key same as entity A, using @MapsId as mentioned here
https://vladmihalcea.com/the-best-way-to-map-a-onetoone-relationship-with-jpa-and-hibernate/
Similarly I kept entity C primary key same as entity B.
I fixed this by changing the relationship like this
A ||---|| B
A ||---|| C