2012-04-17 48 views
1

當構建基於maven datanucleus的項目時,我得到以下錯誤。我在插件下放置了maven-datanucleus-plugin,並正確定義了包含持久化類的路徑。有人可以幫助解決這個問題嗎?maven datanucleus ASM問題

Exception in thread "Thread-1" You have selected to use ClassEnhancer "ASM" yet 
the JAR for that enhancer does not seem to be in the CLASSPATH! 
org.datanucleus.enhancer.NucleusEnhanceException: You have selected to use Class 
Enhancer "ASM" yet the JAR for that enhancer does not seem to be in the CLASSPAT 
H! 
     at org.datanucleus.enhancer.DataNucleusEnhancer.init(DataNucleusEnhancer 
.java:212) 
     at org.datanucleus.enhancer.DataNucleusEnhancer.addClasses(DataNucleusEn 
hancer.java:370) 
     at org.datanucleus.enhancer.EnhancerProcessor$EnhanceRunnable.run(Enhanc 
erProcessor.java:163) 
     at java.lang.Thread.run(Thread.java:662) 

謝謝。

回答

1

所以你想使用增強器,並且不要把asm.jar放在CLASSPATH中,按照文檔。不能更清楚。

+0

ASM沒有maven依賴關係(我也從datanucleus-enhancer中排除)。但是我仍然得到同樣的錯誤。 – Chandana 2012-04-18 15:58:04

+1

的DN增強劑(你正在運行)具有如下所示http://repo1.maven.org/maven2/org/datanucleus/datanucleus-enhancer/3.0.1/datanucleus-enhancer-3.0.1 ASM上的依賴。 POM – DataNucleus 2012-04-18 16:01:20