Oct 26th, 2009, 02:11 PM
dm Server, AspectJ LTW, EclipseLink JPA
I followed the PetClinic-1.5.0 example in setting up EclipseLink JPA for my persistent layer. I get the error below when lazy fetching is enabled. After multiple forum and web searches, it appears this error is due to a failure in load-time-weaving. Based on this, can I get help with
1.) How do I enable verbose logging or debug output to help me determine if load-time-weaving has been properly enabled?
I am using the context namespace configuration <context:load-time-weaver aspectj-weaving="on" />. Also, when not using lazy fetching, the transaction support is working as expected (I assume this also uses load-time-weaving since I configure it with <tx:annotation-driven mode="aspectj" />).
2.) To ensure that dependencies on com.springsource.org.eclipse.persistence are satisfied, I also use import-scope:=application. Is there any other subtle configuration that I need to make this work in an OSGi environment like dm Server?
3.) I tried modifying dm Server's startup to include a -javaagent:spring-agent.jar argument; however, my searches have indicated this is really not necessary. This change did not fix the error.
The relevant exception I believe is
---- (truncated for readability)
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()
Descriptor: RelationalDescriptor(net.fractech.fds.backoffice.J ob --> [DatabaseTable(JOBS)])
Which shows that the _persistence_getcustomer_vh() and _persistence_setcustomer_vh() methods were not automatically weaved into the Job domain object.
I am using springsource-dm-server-1.0.2.SR02, EclipseLink 1.1.0, AspectJ 1.6.3. I tried upgrading to the latest AspectJ (1.6.6) but I received conflicting package exports with the Spring Library (2.5.6.A).
Thanks for the help.
Tags for this Thread