2

I am receiving the error

[javac] Note: The persistence xml file [META-INF/persistence.xml] was not found. NO GENERATION will occur!! Please ensure a persistence xml file is available either from the CLASS_OUTPUT directory [META-INF/persistence.xml] or using the eclipselink.persistencexml property to specify its location. 

when I attempt to compile my program using my build.xml file.

I made sure to put my META-INF/persistence.xml file in src/main/java/resources/META-INF/persistence.xml, and I attempted to add ../../src/main/java/resources/META-INF/persistence.xml to Properties -> Java Compiler -> Annotation Processing as a key value pair for the Processor options as suggested by this blog discussing the same issue, but with Maven. The META-INF/persistence.xml is also being copied over to the bin/ directory.

What am I missing here? I can't figure out why the build.xml compile is having a hard time locating the persistence file.

Dumpcats
  • 453
  • 5
  • 21
  • war layout or ejb layout? – user993553 Oct 06 '15 at 17:35
  • The error states the problem - it cannot find the persistence.xml in the CLASS_OUTPUT directory that it is being run against. Check you scripts to ensure they move the file for you when they compile your java classes correctly, as they are missing a step. – Chris Oct 07 '15 at 15:02

0 Answers0