2

I am using EclipseLink 2.5.1 on Tomcat 8. Tried to static weave jars, but got error at run time.

java.lang.NoSuchMethodError: mypackage.Employee._persistence_checkFetchedForSet(Ljava/lang/String;)V
        at mypackage.Employee.setAddress(Employee.java)

Employee extends a super class that is annotated with @MappedSuperclass. The superclass is in a different jar. I tried to weave the jar, the superclass with @MappedSuperclass was not woven.

If I disable static weaving, dynamic weaving is not supported in Tomcat. all lazy properties will become eager fetch. Is there a way to control the fetch graph? Fetch graph is to fetch lazy properties, can not make eager properties to be lazy.

Thanks.

Dave
  • 487
  • 1
  • 6
  • 19
  • Are you able to weave the class files before packaging them into jars? – Chris Jun 27 '14 at 13:34
  • yes. weaving jar at build-time, no errors. but at run time, java.lang.NoSuchMethodError. – Dave Jun 27 '14 at 20:04
  • Probably this is a class-loading issue. – kriegaex Jul 20 '14 at 08:16
  • This seems to be similar/duplicate of http://stackoverflow.com/questions/13392986/mappedsuperclass-static-weaving-with-eclipselink-and-multiple-jars - and the answer seems to be "not supported" by EclipseLink. (Seems that people working with JPA generally don't support modularity that much. Kinda shame.) – virgo47 May 04 '15 at 08:46
  • BTW: I created bug report for this, you may want to vote: https://bugs.eclipse.org/bugs/show_bug.cgi?id=466271 – virgo47 May 04 '15 at 09:40

0 Answers0