Weaving is apparently disabled-
or at least that's the intent-in Glassfish embedded.
However, when I use the embeddable Glassfish APIs, documented at http://embedded-glassfish.java.net/nonav/apidocs/, it appears that weaving is attempted.
I have an EJB project set up with a persistence unit in it. So, some classes are EJB interfaces, others are EJB implementations, and others are entity classes. There is a META-INF/persistence.xml file in there. javax.ejb.embeddable.EJBContainer deploys this "archive" fine.
I've recently switched over to using the Glassfish embeddable APIs instead, since they are more robust (they support remote EJBs among other things). I've made no other changes.
At test time, I get the exception message detailed by this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=323403
That is, EclipseLink 2.2.0 is attempting to invoke a weaving-supplied method, even though weaving is disabled.
I suspect that something about the way weaving is "disabled" is not in fact fully disabling it.
In point of fact, I would like weaving to be ON. But I understand that this is an issue with an embedded API.
I can work around this issue if I explicitly set weaving to be off in my persistence.xml file:
<property name="eclipselink.weaving" value="false"/>
...but I'd rather not do that.
|Field||Original Value||New Value|
|Assignee||Bhavanishankar [ bhavanishankar ]||Mitesh Meswani [ mm110999 ]|
|Tags||3_1-fishcat 3_1-review||3_1-approved 3_1-fishcat 3_1-review|
|Tags||3_1-approved 3_1-fishcat 3_1-review||3_1-approved 3_1-fishcat|
|Assignee||Mitesh Meswani [ mm110999 ]||Paul Davies [ pauldavies ]|
|Component/s||docs [ 10597 ]|
|Component/s||embedded [ 10643 ]|
|Summary||Weaving attempted in Glassfish embedded even though supposedly disabled||[UB]Weaving attempted in Glassfish embedded even though supposedly disabled|
|Assignee||Paul Davies [ pauldavies ]||Rebecca Parks [ junesm ]|
|Fix Version/s||3.1_ms08 [ 11017 ]|
|Assignee||Rebecca Parks [ junesm ]||Mitesh Meswani [ mm110999 ]|
|Priority||Major [ 3 ]||Critical [ 2 ]|
|Component/s||entity-persistence [ 10624 ]|
|Component/s||docs [ 10597 ]|
|Summary||[UB]Weaving attempted in Glassfish embedded even though supposedly disabled||Regression: Weaving attempted in Glassfish embedded even though supposedly disabled|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
[ I should mention that (hopefully obviously) when I disable weaving from my persistence.xml everything works OK.
It also appears to me that weaving is NOT enabled in the absence of the system property. That is, I can't make the "_vh_ method" exception above disappear by doing anything other than disabling weaving from my persistence.xml file. ]
[ I have set the system property mentioned above to false.
As I understand it, this should prevent EclipseLink from attempting to weave anything.
I am using the embedded Glassfish APIs directly--build 41.
I get the following error from my unit test:
Exception [EclipseLink-218] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DescriptorException
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.
There is no mention in my persistence.xml file of any weaving property at all.
Have I misunderstood something? ]