Duplicate Loading of META-INF/orm.xml if specified in perstistence.xml
----------------------------------------------------------------------
Key: EJB-339
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-339
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.3.1.GA
Environment: JBoss 4.2.2.GA
Sun Java 6
Reporter: Mirko Novakovic
Priority: Minor
I had specified <mapping-file>/META-INF/orm.xml</mapping-file> in my
persistence.xml to load the standard orm.xml, which included some named queries. When
deploying and starting the application in JBoss, I get the following exception:
org.hibernate.DuplicateMappingException: Duplicate query mapping
After removing the <mapping-file>/META-INF/orm.xml</mapping-file> from my
perstistence.xml, the application works fine.
It seems that the EntityManager loads the default META-INF/orm.xml and the one specified
in the persistence.xml, even if they are the same. This is not a big issue, but took me
some time to find it out and I think it would be better to log a warning in this case or
just ignore duplications.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira