Why i am getting this exception in when migrating from jboss4.2.3 to wildfly8.1:-- Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.tzaconsulting.ptw.employee.common.po.WorkcellEmployee
gaurav1216 Aug 1, 2014 8:45 AM2014-07-31 11:49:15,266 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 50) MSC000001: Failed to start service jboss.persistenceunit."ptw-ear-1.ear/ptw-war-1.war#PTW": org.jboss.msc.service.StartException in service jboss.persistenceunit."ptw-ear-1.ear/ptw-war-1.war#PTW": javax.persistence.PersistenceException: [PersistenceUnit: PTW] Unable to build Hibernate SessionFactory
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_65]
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: PTW] Unable to build Hibernate SessionFactory
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1225) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.access$600(EntityManagerFactoryBuilderImpl.java:119) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:853) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
... 8 more
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3762) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3751) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3739) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
... 13 more
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.tzaconsulting.ptw.employee.common.po.WorkcellEmployee
at org.hibernate.cfg.Configuration$MappingsImpl.addClass(Configuration.java:2835) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:178) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3759) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
... 18 more
2014-07-31 11:49:15,289 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "ptw-ear-1.ear")]) - failure description: {
"JBAS014671: Failed services" => {"jboss.persistenceunit.\"ptw-ear-1.ear/ptw-war-1.war#PTW\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ptw-ear-1.ear/ptw-war-1.war#PTW\": javax.persistence.PersistenceException: [PersistenceUnit: PTW] Unable to build Hibernate SessionFactory
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: PTW] Unable to build Hibernate SessionFactory
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.tzaconsulting.ptw.employee.common.po.WorkcellEmployee"},
"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.undertow.deployment.default-server.default-host./ptw.UndertowDeploymentInfoService is missing [jboss.security.security-domain.website-domain]"]
}