2012-10-17 4 views
1

나는 다음과 같은 오류 얻을 persistence.xml 파일의 (메이븐) 필터링을 가능하게 할 때마다 내 치어에서DataNucleus : 없음 "의 persistence.xml"파일이 CLASSPATH에서 찾을 수 없습니다

SEVERE: DataNucleus Enhancer completed with an error. Please review the enhancer log for full details. Some classes may have been enhanced but some caused errors 
No "persistence.xml" files were found in the CLASSPATH yet you specified as input the name ("toto") of a "persistence-unit" to enhance. You must have a valid "persistence.xml" file in the CLASSPATH in a valid location to use this option. 
org.datanucleus.enhancer.NucleusEnhanceException: No "persistence.xml" files were found in the CLASSPATH yet you specified as input the name ("toto") of a "persistence-unit" to enhance. You must have a valid "persistence.xml" file in the CLASSPATH in a valid location to use this option. 
    at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:785) 
    at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:525) 
    at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1258) 

을 .XML 난 그냥이 사용하고 있습니다 :

<resources> 
    <resource> 
     <filtering>true</filtering> 
     <directory>src/main/resources/META-INF/</directory> 
    </resource> 
</resources> 

답변

1

META-INF를/후 클래스 폴더에 META-INF 디렉토리를하지 않습니다 구성된 디렉토리 요소 또는 다른 메이븐에서 제거해야 지속성을 필터링 한 .xml 파일.