Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble with Aspectj load-time-weaving when using EclipseLink JPA in Spring dm Server 1.x
    primarykey
    data
    text
    <p>I am attempting to get EclipseLink JPA working inside the Spring dm Server OSGi environment.</p> <p>Relevant frameworks and libraries downloaded from the Spring Enterprise Bundle Repository include:</p> <ul> <li>dm Server 1.0.2.SR02</li> <li>AspectJ Runtime 1.6.3</li> <li>AspectJ Weaver 1.6.3</li> <li>Spring Framework 2.5.6.A</li> <li>Eclipse Persistence 1.1.0</li> <li>Javax Persistence API 1.99.0</li> </ul> <p>I followed the same structure as presented in the <a href="http://www.springsource.org/dmserver" rel="nofollow noreferrer">PetClinic-1.5.0</a> example for setting up EclipseLink JPA. Everything works until lazy-fetching is enabled (which requires proxied objects).</p> <p>Once lazy-fetching is enabled, the following error suggests that load-time-weaving is not working correctly.</p> <p>---- (truncated for readability)</p> <p>Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.0.r3634): org.eclipse.persistence.exceptions.DescriptorExcep tion Exception Description: The method [_persistence_setcustomer_vh] or [_persistence_getcustomer_vh] is not defined in the object [net.fractech.fds.backoffice.Job]. Internal Exception: java.lang.NoSuchMethodException: net.fractech.fds.backoffice.Job._persistence_getcu stomer_vh() Mapping: org.eclipse.persistence.mappings.OneToOneMapping[customer] Descriptor: RelationalDescriptor(net.fractech.fds.backoffice.J ob --> [DatabaseTable(JOBS)])</p> <hr> <p>This shows that the _persistence_getcustomer_vh() and _persistence_setcustomer_vh() methods were not automatically weaved into the Job domain object.</p> <p><strong>Questions</strong></p> <p>1.) How do I determine if load-time-weaving is actually working; moreover, how do I log which load time weaving agent and weaver was started? How do I pass switches to this weaver to have it output debugging information?</p> <p>I assume I started load-time-weaving with &lt;context:load-time-weaver aspectj-weaving="on" /&gt;</p> <p>2.) Many searches have revealed that I do not need to pass the -javaagent parameter to the jvm when using dm Server. Is this correct?</p> <p>3.) I have assured that my domain objects in another bundle have access to the eclipse persistence classes by asserting com.springsource.org.eclipse.persistence;version="[1.1.0,1.1.0]";import-scope:=application in my eclipselink bundle and including all application bundles within a PAR. Are there any other configurations needed to enable EclipseLink JPA in Spring dm Server?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload