[hibernate-issues] [Hibernate-JIRA] Updated: (METAGEN-75) Maven plugin and JPA XML configuration path problem

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Jan 25 06:50:10 EST 2012


     [ http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik updated METAGEN-75:
-------------------------------------

    Fix Version/s: 1.2.next

> Maven plugin and JPA XML configuration path problem
> ---------------------------------------------------
>
>                 Key: METAGEN-75
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-75
>             Project: Hibernate Metamodel Generator
>          Issue Type: Bug
>          Components: processor
>    Affects Versions: 1.1.1.Final
>         Environment: Ubuntu, Maven 2, Java 6
>            Reporter: Nickolay Mazurkin
>            Assignee: Hardy Ferentschik
>             Fix For: 1.2.next
>
>
> I have a problem with generating metamodel from JPA configuation 
> I have JPA config like the following - there are a lot of ORM mapping in relative subdirectories
> <persistence-unit name="ApplicationDataSource" transaction-type="RESOURCE_LOCAL">
>     <description>Main persistence descriptor</description>
>     <mapping-file>configuration/model/jpa/mappings/base.xml</mapping-file>
>     <mapping-file>configuration/model/jpa/mappings/entities/employer.xml</mapping-file>
>     <mapping-file>configuration/model/jpa/mappings/entities/unit/unit.xml</mapping-file>
>     ...
>     <mapping-file>configuration/model/jpa/mappings/entities/unit/maintenance.xml</mapping-file>
> </persistence-unit>
> The problem is that processor is not able to find all these mappings without trailing slash. The following config works with metamodel processor
> <persistence-unit name="ApplicationDataSource" transaction-type="RESOURCE_LOCAL">
>     <!-- with trailing slash -->
>     <mapping-file>/configuration/model/jpa/mappings/base.xml</mapping-file> 
> </persistence-unit>
> But the trailing slash doesn't allow the config to be loaded by Hibernate org.hibernate.ejb.Ejb3Configuration - Hibernate fails to load the config with trailing slash

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list