You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Lazar Kirchev <la...@gmail.com> on 2017/06/19 11:17:41 UTC

PersistenceUnitUtil.getIdentifier() throws a NPE

Hello,

I noticed that in TomEE Plume if
PersistenceUnitUtil.getIdentifier(<some_entity>) is called before any
persistence operation is performed, it throws a NullPointerException. This
happens because in EclipseLink PersistenceUnitUtil.getIdentifier() uses an
object which gets initialized upon entity manager creation. And TomEE
initially binds in the application context a JtaEntityManager, while the
actual EclipseLink entity manager is created lazily on the first
persistence operation.

This seems to be a problem of EclipseLink, but is there any way to work it
around in TomEE? Any way, e.g., to force creation of the actual entity
manager instead of lazy creation?

Regards,
Lazar