13 Replies Latest reply on Mar 5, 2015 10:54 AM by Jason Holmberg

    Mulitple Hibernate Mappings of the same Class

    Simon Martinelli Novice

      Until JBoss 6.1.0 it was possible to have to Persistence Unites mapping the same class with Hibernate XML.

      But WildFily says: Duplicate mapping

       

      In my opinion this should be possible according to the spec.

        • 1. Re: Mulitple Hibernate Mappings of the same Class
          Scott Marlow Master

          Can you provide your persistence.xml + hibernate.xml files?  Also, include the full exception (with the call stack as well.) 

          • 2. Re: Mulitple Hibernate Mappings of the same Class
            Simon Martinelli Novice

            1. The stacktrace

             

            2013-10-30 08:12:15,487 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 58) MSC000001: Failed to start service jboss.persistenceunit."ProShopEar.ear#ProShopLegacy": org.jboss.msc.service.StartException in service jboss.persistenceunit."ProShopEar.ear#ProShopLegacy": javax.persistence.PersistenceException: [PersistenceUnit: ProShopLegacy] Unable to build Hibernate SessionFactory

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:169)

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)

              at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25]

              at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:463) [wildfly-security-manager-1.0.0.Beta3.jar:1.0.0.Beta3]

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:178)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]

            Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ProShopLegacy] Unable to build Hibernate SessionFactory

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1223)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.access$600(EntityManagerFactoryBuilderImpl.java:119)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:847)

              at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846)

              at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:151)

              ... 8 more

            Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3680)

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3669)

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3657)

              at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1394)

              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1824)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854)

              ... 13 more

            Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.prodega.proshop.model.article.DiscountText

              at org.hibernate.cfg.Configuration$MappingsImpl.addClass(Configuration.java:2781)

              at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:175)

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3677)

              ... 18 more

            2013-10-30 08:12:15,561 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-3) Creating Service {http://service.proshop.prodega.com/}ProviaMobileServiceService from class com.prodega.proshop.service.ProviaMobileService

            2013-10-30 08:12:16,198 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 60) HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect

            2013-10-30 08:12:16,252 INFO  [org.hibernate.cfg.Configuration] (ServerService Thread Pool -- 60) HHH000071: Duplicate import: com.prodega.proshop.model.customer.TitleText -> com.prodega.proshop.model.customer.TitleText

            2013-10-30 08:12:16,253 INFO  [org.hibernate.cfg.Configuration] (ServerService Thread Pool -- 60) HHH000071: Duplicate import: com.prodega.proshop.model.customer.TitleText -> TitleText

            2013-10-30 08:12:16,254 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-3) Setting the server's publish address to be http://localhost:8080/ProShopEjb/ProviaMobileService

            2013-10-30 08:12:16,254 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 60) MSC000001: Failed to start service jboss.persistenceunit."ProShopEar.ear#ProShopJpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."ProShopEar.ear#ProShopJpa": javax.persistence.PersistenceException: [PersistenceUnit: ProShopJpa] Unable to build Hibernate SessionFactory

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:169)

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)

              at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25]

              at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:463) [wildfly-security-manager-1.0.0.Beta3.jar:1.0.0.Beta3]

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:178)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]

            Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ProShopJpa] Unable to build Hibernate SessionFactory

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1223)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.access$600(EntityManagerFactoryBuilderImpl.java:119)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:847)

              at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846)

              at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:151)

              ... 8 more

            Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3680)

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3669)

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3657)

              at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1394)

              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1824)

              at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854)

              ... 13 more

            Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.prodega.proshop.model.customer.TitleText

              at org.hibernate.cfg.Configuration$MappingsImpl.addClass(Configuration.java:2781)

              at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:175)

              at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3677)

              ... 18 more

            • 3. Re: Mulitple Hibernate Mappings of the same Class
              Simon Martinelli Novice

              2) the persistence.xml

               

              <?xml version="1.0" encoding="UTF-8"?>

              <persistence version="2.0"

                xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

               

               

                <persistence-unit name="ProShopJpa">

                <jta-data-source>java:/jdbc/proshop</jta-data-source>

                <exclude-unlisted-classes>true</exclude-unlisted-classes>

                <properties>

                <property name="hibernate.ejb.cfgfile" value="/hibernate-mappings.xml" />

               

               

                <property name="hibernate.cache.use_second_level_cache"

                value="true" />

                <property name="hibernate.cache.use_query_cache" value="true" />

                <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />

               

               

                <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

                <property name="hibernate.format_sql" value="false" />

                <property name="hibernate.session_factory_name" value="ProShopJpaSessionFactory" />

                </properties>

                </persistence-unit>

               

               

                <persistence-unit name="ProShopLegacy">

                <jta-data-source>java:/jdbc/proshop</jta-data-source>

                <exclude-unlisted-classes>true</exclude-unlisted-classes>

                <properties>

                <property name="hibernate.ejb.cfgfile" value="/legacy-mappings.xml" />

               

               

                <property name="hibernate.cache.use_second_level_cache"

                value="true" />

                <property name="hibernate.cache.use_query_cache" value="true" />

                <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />

               

               

                <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

                <property name="hibernate.session_factory_name" value="java:/hibernate/ProShopDispoSessionFactory" />

                </properties>

                </persistence-unit>

               

               

              </persistence>

              • 4. Re: Mulitple Hibernate Mappings of the same Class
                Scott Marlow Master

                It looks like the change came into Hibernate 3.5 via https://hibernate.atlassian.net/browse/HHH-3439.  I don't know exactly as to why the error check is performed and exception thrown.  You would have to ask on the Hibernate forums probably for that.

                 

                Looking at the code, my guess is that the exception is to guard against the same entity being mapped in different ways.

                public void addClass(PersistentClass persistentClass) throws DuplicateMappingException {

                    Object old = classes.put( persistentClass.getEntityName(), persistentClass );

                    if ( old != null ) {

                        throw new DuplicateMappingException( "class/entity", persistentClass.getEntityName() );

                    }

                }

                If you like, you could try making a change to http://github.com/hibernate/hibernate-orm/ class org.hibernate.cfg.Configuration to see if you can improve the situation.  See the community links on http://hibernate.org for guidance on making Hibernate code changes.

                 

                Scott

                • 5. Re: Mulitple Hibernate Mappings of the same Class
                  Simon Martinelli Novice

                  That's strange because we have Hibernate 3.6.6 in JBoss AS 6.1.0

                   

                  Shouldn't the entity name be unique per persistence unit?

                  • 6. Re: Mulitple Hibernate Mappings of the same Class
                    Scott Marlow Master

                    So, its something different than I said but its still the code that I mentioned above that is throwing the exception.

                     

                    You could try packaging the Hibernate 3.6.6 jars into the modules/system/layers/base/org/hibernate/3 folder, see documentation link here for some guidance (you need to add the name of each Hibernate 3 jar in the module.xml file).  If you try this and run into any difficulties, we can update the documentation to address them.  I haven't heard from anyone else trying to do this, so it will be interesting to see how Hibernate 3.6.6 works for you on WildFly.  We do have a unit test that is packaging Hibernate 3.6.6 jars with an application deployment, so this should work...

                     

                    I'm hoping to learn more information about the problem that you are experiencing from this experiment. 

                    1 of 1 people found this helpful
                    • 7. Re: Mulitple Hibernate Mappings of the same Class
                      Simon Martinelli Novice

                      In our case this is just a temporary state because we are refactoring our application.

                      We now have a common model but with two purposes. So the mapping must be different but all is packed into one EAR.

                       

                      Maybe it would be better to first eliminate the duplicate mappings and then move to WildFly.

                       

                      As I know the specification our case is not specified. But I think that an entity name must be unique across the whole application does not make sense because I can have multiple persistence units.

                      So the unique name should also contain the persistence unit name.

                      What do you think?

                      • 8. Re: Mulitple Hibernate Mappings of the same Class
                        Scott Marlow Master

                        I'm not sure that it has anything to do with there being two separate persistence units.  You could comment out the "ProShopJpa" persistence unit definition and see if that helps.  If commenting out "ProShopJpa", makes the error go away, that will be interesting to know.

                         

                        Are there duplicate copies of the com.prodega.proshop.model.article.DiscountText class in your ear?

                        • 9. Re: Mulitple Hibernate Mappings of the same Class
                          Simon Martinelli Novice

                          The classes are not duplicated!

                          But there are two hbm.xml files mapping the same class and by default the entity name is the simple name of the class.

                          It seams that Hibernate in WildFly is scanning all mappings without taking the persistence unit in account. This leads to the duplicate mapping exception.

                           

                          When I comment out on of the persistence units it works because of the effect described above.    

                          • 10. Re: Mulitple Hibernate Mappings of the same Class
                            Scott Marlow Master

                            What happens when you have both persistence units enabled but comment out one of the "hibernate.ejb.cfgfile" properties?

                            • 12. Re: Mulitple Hibernate Mappings of the same Class
                              Kumar Gaurav Newbie

                              I am also getting the same exception, But i do'nt find any answer yet. Would you please tell me which part of code i need to commented out.

                               

                              My persistence.xml:--

                               

                              <persistence>

                                <persistence-unit name="PTW">

                               

                               

                                <jta-data-source>java:/PTWDS</jta-data-source>

                                <properties>

                                <property name="hibernate.hbm2ddl.auto" value="none" />

                                <property name="hibernate.ejb.cfgfile"

                                value="/hibernate.cfg.xml" />

                                <property name="hibernate.connection.isolation" value="2" />

                                </properties>

                                </persistence-unit>

                              </persistence>

                               

                               

                              And Hibernate.cfg.xml:--

                               

                              <?xml version='1.0' encoding='UTF-8'?>

                              <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

                               

                               

                              <hibernate-configuration>

                                <session-factory>

                                 <property name="hibernate.session_factory_name">HibernateSessionFactory</property>

                                 <property name="current_session_context_class">thread</property>

                                 <property name="show_sql">false</property>

                                 <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>

                                <!-- Mapping files -->

                                <mapping resource="com/tzaconsulting/ptw/common/po/Country.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/common/po/PTWSysConfig.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/common/po/ActivityFieldLookup.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/common/po/ScheduledRequest.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/common/po/ScheduledTask.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/Employee.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeHomeActivity.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeScheduleGroup.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeNotes.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/LaborUnion.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/LearningCurve.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeLearningCurve.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeLearningCurveHistory.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/Workcell.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/WorkcellEmployee.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/WorkcellActivity.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/WorkcellActivityZone.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/CertificationCriteria.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeCertification.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/Shift.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeSchedule.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/EmployeeStatus.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/Schedule.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/ScheduleVariant.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/ScheduleActivities.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/DepartureReasonLov.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/HiringSourceLov.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/Department.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/ObservationCauseLOV.hbm.xml"/>

                               

                                <!--   <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/IncentiveGroup.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/PayQualityCriteria.hbm.xml" />

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/IncentiveOthers.hbm.xml" />

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/IncentiveAccrualLov.hbm.xml" /> -->

                               

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/IncentivePlan.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/PayPerformanceCriteria.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/PerformancePayoutScale.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/IncentiveActivity.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/IncentiveEmployee.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/DisciplinePlan.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/DisciplineEmployee.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/DisciplineStep.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/DisciplineSet.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/DisciplineSetActivity.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/DisciplineGroup.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/Activity.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/Customers.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/ActivityGroup.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/Microzone.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/Zone.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/TaskingGroup.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/QualityType.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/PayPlan.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/PayPlanCriteria.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/PayPlanTeam.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/EmployeePayCalculation.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/EmployeePayBreakDown.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/ScheduleGroup.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/ScheduleGroupVariant.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/ScheduleGroupVariantDetails.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/Assignments.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/IncentiveReasonCode.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/DelayReasonCode.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/DowntimeReasonCode.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/DisciplineReasonCode.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/EmployeeDisciplineCalculation.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/EmployeeIncentiveCalculation.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/TripAudit.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/TimeAttendance.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/QualityRecord.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/TaskDetails.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/WorkSchedule.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/WorkScheduleActivities.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/DocumentVersions.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/Documents.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/AssignmentDeterminants.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/AssignmentTasks.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/PurgeDetails.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/PurgeLog.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/AssignmentNoSequence.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/Groupdelays.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/GroupDelaysEmployee.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/ScheduledProcesses.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/Family.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/FamilyKioskMachine.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/kiosk/po/KioskMachine.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/MainMenu.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/RoleFunction.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/FunctionList.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Role.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Facility.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/AlertCriteria.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/AlertMonitorEntities.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/AlertMonitorPlan.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/AlertReports.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/AlertSubscribers.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Determinant.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/EquipmentHorizontalSpeedBreak.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/EquipmentVerticalSpeedBreak.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Equipment.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/HandlingTime.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/HandlingMatrix.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Msd.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/MsdTemplate.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Selector.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/SelectorFields.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Standard.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/StandardDeterminant.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/DeterminantCondition.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/ImportFieldList.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/ImportTypeLov.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/WmsImportFields.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/laborplanning/common/po/LaborPlanningConfig.hbm.xml" />

                                <mapping resource="com/tzaconsulting/ptw/laborplanning/common/po/LaborPlanningSetup.hbm.xml" />

                                <mapping resource="com/tzaconsulting/ptw/facilitylayout/common/po/FacilityLayout.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/analysis/common/po/ReportProfile.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/analysis/common/po/ReportProfileFilter.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/travelcalculations/common/po/TravelPreCalc.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/ProcessAssignments.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/RoleProfile.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/WMSImportData.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/PurgeTasks.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/common/po/Test.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/common/po/LatencyInfo.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Team.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/TeamCriteria.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Profile.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/ProfileCriteria.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/ProfileCriteriaConditions.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/ProfileMyFavorite.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/ProfileTeam.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Region.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/Businessunit.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/BusinessRegion.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/Route.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/RouteAssignmentsDetails.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/PointOfBusiness.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/maintenance/common/po/CustomerPointOfBusiness.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/facilitylayout/common/po/NodeLocationCache.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/ScheduleGroupStatus.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/operations/common/po/EmployeeIncentiveActivity.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/employee/common/po/LanguageLov.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/MfgTeam.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/MfgTeamEmployee.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/SavingConfig.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/EmployeeSavings.hbm.xml"/>

                                <mapping resource="com/tzaconsulting/ptw/configuration/common/po/FacilitySavings.hbm.xml"/>

                              <!--  Mapping files -->

                              </session-factory>

                              </hibernate-configuration>

                               

                               

                              I was also trying to upgrade JBoss4.2 to Wildfly.Thanks for advance.

                              • 13. Re: Mulitple Hibernate Mappings of the same Class
                                Jason Holmberg Newbie

                                Have you been able to find a solution?  The only work around I have found the works is to apply auto-import="false" to my mapping files.  But seems to cause me to use the FQN in all my HQL.

                                 

                                Using Wildfly 8.2 Final with the built in Hibernate version 4.3.7