79605189

Date: 2025-05-03 23:39:59
Score: 0.5
Natty:
Report link

Even though late to the party I would also like to point you to another possible cause of this failure. It took me many hours to figure this out when I encountered the very same exception javax.persistence.EntityNotFoundException. That's why I am happy to share the result of my investigation. The database user had permissions to access the primary table (First in the original post), but not the child table (Second in the original post). Using a database browser logged in as the same database user my JPA application has been using to access the database, SELECT * FROM SECOND; always yielded the empty result set, even though I have know that it has actually contained several data. After having granted the necessary permissions the the database user the EntityNotFoundException vanished.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: phb