错误实际上是一个冲突持久性单元,它是在组件中定义的,它是我项目的父级。我的spring上下文是从组件的target / classes文件夹和存储在本地maven存储库中的jar中获取该冲突单元。为什么会这样?这是错误跟踪:
Error creating bean with name 'persistenceUnitManager' defined in class
path resource [spring-config/framework-persistence-context.xml]: Invocation
of init method failed; nested exception is java.lang.IllegalStateException:
Conflicting persistence unit definitions for name 'persistence-framework':
file:/D:/fw/projects/springproj-core-project/springproj-core-framework/target/classes,
file:/C:/Users/prateek.chachra/.m2/repository/com/springproj/
springproj-core-framework/1.4.M1/springproj-core-framework-1.4.M1.jar