'com.objectdb.o._EntityNotFoundException' vs 'javax.persistence.EntityNotFoundException'

#1

Hello 

When I try to catch the EntityNotFoundException, instead of 

javax.persistence.EntityNotFoundException

a

com.objectdb.o._EntityNotFoundException

is thrown, which seemed not to be a subclass of the 'javax.persistence.EntityNotFoundException'. Is there any reason for that behavior.  How can I make the source JPA conform?

 

best regards

Arne

 

 

#2

ObjectDB uses subclasses of the standard JPA exception classes in order to add functionality (e.g. by overriding the printStackTrace method, additional information, such as the ObjectDB version that is in use, is printed).

Particularly, com.objectdb.error.jpa._EntityNotFoundException is a subclass of javax.persistence.EntityNotFoundException.

Which ObjectDB version do you use?

If _EntityNotFoundException is not recognized as a subclass of EntityNotFoundException, maybe this is because of loading EntityNotFoundException more than once using different class loaders. Please check that the JPA classes are available to your application only once.

 

ObjectDB Support

Reply