Caused by 1st argument of extractNaturalIdValues ('state') being null. The argument is null because in client code (AbstractEntityPersister.handleNaturalIdReattachment) the entitySnapshot is not present in persistent context and while the method PersistenceContext.getDatabaseSnapshot return null when there is no snapshot (as documented), the code in handleNaturalIdReattachment seems to expect StatefulPersistenceContext.NO_ROW.
|