Found the solution. The problem was in my enhance.xml. I included the build path twice. Deleted the second path declaration in xml File. And now the Warning (No metadata was found for 1 classes) is gone. Here my new enhance.xml:
<?xml version="1.0" encoding="UTF-8"?> <project name="testJSF"> <path id="jpa.enhancement.classpath"> <pathelement location="build"/> <pathelement location="${basedir}/build/classes"/> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </path> <target name="enhance"> <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"> <classpath refid="jpa.enhancement.classpath"/> </taskdef> <openjpac> <config propertiesFile="src/META-INF/persistence.xml" /> <classpath refid="jpa.enhancement.classpath"/> </openjpac> <echo message="Enhancing complete."/> </target> </project> -- View this message in context: http://openjpa.208410.n2.nabble.com/JPA-Enhancement-with-Eclipse-and-Ant-Class-not-found-Exception-tp7405353p7409452.html Sent from the OpenJPA Users mailing list archive at Nabble.com.