Posts

Showing posts with the label jdo

JDO error: Specified enum getter-by-value for field...

Specified enum getter-by-value for field ... gave an error on extracting the enum so just using the ordinal : null This is a very vague message that could occur due to a very common mistake. Which is writing your enum getter-by-value or value-getter methods to accept or return numbers that aren't of the type " short " I don't know if there is a way to bypass this restriction.

Object Manager has been closed error

I recently faced this strange situation when datanculeus started throwing a "Object Manager has been closed" exception. This basically means I'm trying to detach the object in hand after the persistence manager was closed. But that wasn't the case at all ! However, regarding the way I solved this, here is my assumption. Even if:  Your field is included in the default fetch group ( defaultFetchGroup = "true" ) You enabled detachment on closing the persistence manager ( datanucleus.DetachOnClose=true ) You still have to keep the level 1 cache enabled in order for detachment to occur ! But in my case I had it disabled. Or you'll have to detach a copy of the object yourself after querying it.