I am developing a J2SE version "1.8.0_241" application and using property based accessors throughout.
@Entity @Access(AccessType.PROPERTY) public abstract class PlatformTicker implements TickerKey { private final ObjectProperty<Platform> platformConnector = new SimpleObjectProperty<>(); ... public PlatformTicker() { } ... @ManyToOne public Platform getPlatformConnector() { return platformConnector.get(); } public void setPlatformConnector(Platform platformConnector) { this.platformConnector.set(platformConnector); } ... }
I get an exception thrown when trying to create an entity manager i.e.
67: this.em = emf.createEntityManager();
Caused by: com.objectdb.o._PersistenceException: Failed to locate set method for field property domain.PlatformTicker.platformConnector using reflection at com.objectdb.o._PersistenceException.b(_PersistenceException.java:45) at com.objectdb.o.JPE.g(JPE.java:145) at com.objectdb.o.ERR.f(ERR.java:56) at com.objectdb.o.OST.onObjectDBError(OST.java:599) at com.objectdb.jpa.EMF.createEntityManager(EMF.java:153) at domain.DomainModel.<init>(DomainModel.java:67)
This is otherwise working code. The error is intermittent. The database explorer can open the database and browse the data. It seems odd that the error message should complain about field properties when I am using property based accessors throughout the application - and I have provided the property based accessor for the field being complained about.
Any ideas would be greatly appreciated.
Code works fine when running with ObjectDB embedded, but throws the exception randomly when application accesses ObjectDB in server mode.