2010-10-27 101 views
1

我正在一个项目上工作,直到我检查出另一个团队的最新更改,才能使用最新的文件(do不专注于那一个)。 我正在使用Tomcat OpenEJB 3.1,JPA和Hibernate 3.2.6。有什么问题,在部署应用程序后,它卡住:JPA/Hibernate:@PersistenceContext unitName有多个匹配错误

2010-10-27 12:31:45,202 - INFO - Adjusting PersistenceUnit RateQuesto-core <non-jta-data-source> to Resource ID 'jdbc/net.barano.rav.usage.DBNonJta' from 'null' 
2010-10-27 12:31:45,202 - INFO - Configuring PersistenceUnit(name=security_core, provider=org.hibernate.ejb.HibernatePersistence) 
2010-10-27 12:31:45,202 - INFO - Adjusting PersistenceUnit security_core <non-jta-data-source> to Resource ID 'jdbc/net.barano.rav.usage.DBNonJta' from 'null' 
2010-10-27 12:31:45,233 - ERROR - FAIL ... Rikko.net.barano.rav.c_service.foo.KeyQuesto: @PersistenceContext unitName has multiple matches: unitName "Rikko" has 16 possible matches. 
2010-10-27 12:31:45,233 - ERROR - FAIL ... Rikko.net.barano.rav.c_service.foo.CommonFooQuesto: @PersistenceContext unitName has multiple matches: unitName "Rikko" has 16 possible matches. 
2010-10-27 12:31:45,233 - ERROR - FAIL ... Rikko.net.barano.rav.c_service.foo.internal.CommonFooQueries: @PersistenceContext unitName has multiple matches: unitName "Rikko" has 16 possible matches. 
2010-10-27 12:31:45,233 - ERROR - FAIL ... Rikko.net.barano.rav.c_service.foo.internal.KeyNameQueries: @PersistenceContext unitName has multiple matches: unitName "Rikko" has 16 possible matches. 
2010-10-27 12:31:45,233 - ERROR - FAIL ... Rikko.net.barano.rav.c_service.foo.internal.InternalAttach: @PersistenceContext unitName has multiple matches: unitName "Rikko" has 16 possible matches. 
2010-10-27 12:31:45,233 - ERROR - Invalid EjbModule(path=D:\PR_dev\workspaces v3.2.1\usage 5.4\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\rav-usage-admin\WEB-INF\lib\rav-cc-Rikkos-core-5.3.003.jar) 
2010-10-27 12:31:45,233 - ERROR - FAIL ... security_core.net.barano.rav.c_service.security.authentication.LogonQuesto: @PersistenceContext unitName has multiple matches: unitName "security_core" has 16 possible matches. 
2010-10-27 12:31:45,233 - ERROR - Invalid EjbModule(path=D:\PR_dev\workspaces v3.2.1\usage 5.4\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\rav-usage-admin\WEB-INF\lib\rav-cc-security-core-5.3.003.jar) 
2010-10-27 12:31:45,233 - ERROR - FAIL ... TuruHierarchyQuestoBLBenno: @PersistenceContext unitName has multiple matches: unitName "rav-usage-core" has 16 possible matches. 

我有双cheked所有的基本设置,没有被改变。有没有人遇到过这种问题?

我会很感谢这个主题的任何支持。

感谢

回答

2

我猜想,你有你的persistence.xml 16次在classpath。清理冗余的。

+0

嗨Bozho,谢谢你的回应,以及classpath不包含它,实际上它是完全清楚的,因为我已经为此目的制作了另一个dev服务器,并且仍然出现错误。 – redbull 2010-10-27 11:56:06

+0

这包括所有的罐子。你检查了他们吗? (如果你在/ lib中有一些jar文件) – Bozho 2010-10-27 12:00:13

+0

问题解决了,更改来自checkouted资源。 persistance.xml并未排除在pom.xml文件中,所有问题都是在jar文件中包含persistance.xml的结果(项目要求是您必须手动复制该文件,因此第二次),感谢您支持Bozho。 – redbull 2010-10-27 14:12:01