Error in reading Enum in JPA - Failed to read using reflection


I have created a very simple Entity User which has an enum Status (INACTIVE, ACTIVE).

When an entity User is created, everything looks OK and I have seen on explorer that User is created as expected with valid values of Status. This is all done with JPA/EJBs.

However, at the time of reading the Object (findById), the system throws an error 

com.objectdb.o.UserException: Failed to read the value of field using reflection

caused by..

java.lang.IllegalArgumentException: is not an enum type

Please check your enum definition. It should be ordinary enum with no annotations (such as @Entity).

If you cannot see anything wrong, please submit a small test case that demonstrates the problem (using the template on the posting instructions page).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login