I have an application that uses Eclipselink 2.5, and when I run Junit test cases, I always get this warning:
[EL Warning]: metadata: 2013-08-19 01:14:05.142--ServerSession(14351551)-- Reverting the lazy setting on the OneToOne or ManyToOne attribute [currentTransit] for the entity class [class ......persistent.entity.BPExecutionEntity] since weaving was not enabled or did not occur.
So, I wrote the weave task in the Ant build file as follows:
<target name="define.task" description="New task definition for EclipseLink static weaving"> <taskdef name="weave" classname="org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask"/> </target> <target name="weaving" description="perform weaving" depends="define.task"> <weave source="D:\...\dist\${ant.project.name}.jar" target="D:\...\dist\woven-${ant.project.name}.jar" persistenceinfo="D:\...\lib\persistence.jar"> <classpath> </classpath> </weave> </target>
OK, everything works, and when I compile the code, it generates a woven file the size of the size of the compiled jar. But, when I run the tests of the project, I still get the same warning blah blah blah... since weaving was not enabled or did not occur.
Does anyone know how to remove this warning from my tests?
Joe almore
source share