It looks like perhaps EclipseLink weaving (dynamic weaving) is borked when
you're running the latest version (b39, notably not b40, which doesn't
exist) of embedded Glassfish.
As a result I get this bizarre error:
Exception Description: A NullPointerException would have occurred accessing
a non-existent weaved _vh_ method [_persistence_get_person_vh]. The class
was not weaved properly - for EE deployments, check the module order in the
application.xml deployment descriptor and verify that the module containing
the persistence unit is ahead of any other module that uses it.
Of course I am not deploying an .ear file, so there is no application.xml
deployment descriptor. I am deploying a ScatteredArchive of type
ScatteredArchive.Type.JAR, which contains my EJB code as well as persistent
entities, and a META-INF/persistence.xml file.
So it looks like EclipseLink is attempting to weave my file, but for some
reason is failing. If I disable weaving, which I really don't want to do,
by setting the eclipselink.weaving persistence property to "false", then I
get past this problem, but of course none of my lazy loading behavior and
whatnot is actually tested.
So how can I obey the error message when I don't have any other modules
deployed to embeddable Glassfish?
Thanks,
Laird