JPA / Hibernate:@PersistenceContext unitName有多个匹配错误

时间:2010-10-27 11:21:25

标签: java jpa openejb

我正在开发一个项目,到目前为止,它一直很顺利,直到我检查了另一个团队的最新更改,才能处理最新的文件(不要专注于那个)。 我正在使用Tomcat OpenEJB 3.1,JPA和Hibernate 3.2.6。有什么问题,在部署应用程序后,它会被卡住:

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.

我已经对所有基本设置进行了双重处理,但没有更改。有没有人遇到过这种问题?

我将非常感谢本主题的任何支持。

由于

1 个答案:

答案 0 :(得分:2)

我猜你在课程路径上有persistence.xml次16次。清理多余的。