shreyas_s_shah wrote:
I am getting the following mapping exception when attempting to use the composite-id in the link table created when generating a many-to-many relation between two entities.
Please check the xml file in the following section.
Mapping class: com.ge.trans.iys.trains.common.relations.entities.YardTrainBlockCodeEntity -> YARD_TRAIN_BLOCK_CODE
C:\iys\views\main\iys\develop\iys\setup\build-iys-import.xml:122: Failed in building configuration when adding C:\IYS\views\main\IYS\develop\iys\components\iys-trains-server\src\com\ge\trans\iys\trains\server\mappings\YardTrainBlockCodeEntity.hbm.xml
at org.hibernate.tool.ant.ConfigurationTask.addFile(ConfigurationTask.java:145)
at org.hibernate.tool.ant.ConfigurationTask.addMappings(ConfigurationTask.java:123)
at org.hibernate.tool.ant.ConfigurationTask.doConfiguration(ConfigurationTask.java:109)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:180)
at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:144)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:234)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:287)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
Caused by: org.hibernate.MappingException: Could not read mapping document from file: C:\IYS\views\main\IYS\develop\iys\components\iys-trains-server\src\com\ge\trans\iys\trains\server\mappings\YardTrainBlockCodeEntity.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:263)
at org.hibernate.tool.ant.ConfigurationTask.addFile(ConfigurationTask.java:140)
... 17 more
Caused by: org.hibernate.MappingException: class com.ge.trans.iys.trains.common.relations.entities.YardTrainBlockCodeEntity$CompositeID not found while looking for property: yardTrainKey
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:80)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276)
at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2064)
at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1801)
at org.hibernate.cfg.HbmBinder.bindCompositeId(HbmBinder.java:1655)
at org.hibernate.cfg.HbmBinder.bindCompositeId(HbmBinder.java:435)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:349)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:284)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:155)
at org.hibernate.cfg.Configuration.add(Configuration.java:379)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:418)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:260)
... 18 more
Caused by: java.lang.ClassNotFoundException: com.ge.trans.iys.trains.common.relations.entities.YardTrainBlockCodeEntity$CompositeID
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.apache.tools.ant.module.bridge.AntBridge$MaskedClassLoader.loadClass(AntBridge.java:629)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:76)