Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes org.hibernate.MappingException: Association references unmapped class com.db.Soundtracks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.hibernate.MappingException: Association references unmapped class com.db.Soundtracks" Watch "org.hibernate.MappingException: Association references unmapped class com.db.Soundtracks" New topic
Author

org.hibernate.MappingException: Association references unmapped class com.db.Soundtracks

Devesh Chanchlani
Greenhorn

Joined: Sep 04, 2007
Posts: 19
Cannot make out the cause of the error. The realted files are attached below...

SoundTracks.hbm.xml


com.db.Soundtracks


Error Message
[ com.common.ExceptionLogger , log , 25 ] org.hibernate.MappingException: Association references unmapped class: com.db.Soundtracks
[java] at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2399)
[java] at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2678)
[java] at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:66)
[java] at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1163)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1319)
[java] at com.common.BollyDBHibernateFactory.rebuildSessionFactory(BollyDBHibernateFactory.java:84)
[java] at com.common.BollyDBHibernateFactory.getSession(BollyDBHibernateFactory.java:57)
[java] at com.db.DAODAO.getSession(MoviesDAO.java:29)
[java] at com.db.DAODAO.persist(MoviesDAO.java:47)
[java] at DeserializerTest.main(DeserializerTest.java:95)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
[java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
[java] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.runInSameVM(AntLaunchDelegate.java:266)
[java] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:228)
[java] at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:764)
[java] at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:614)
[java] at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:607)
[java] at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild(ExternalToolBuilder.java:179)
[java] at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(ExternalToolBuilder.java:167)
[java] at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build(ExternalToolBuilder.java:86)
[java] at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
[java] at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
[java] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
[java] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
[java] at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
[java] at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
[java] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
[java] at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
[java] at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
[java] at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:330)
[java] at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:182)
[java] at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Thanks in advance.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Have you defined SoundTracks.hbm.xml in your SessionFactory configuration?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Devesh Chanchlani
Greenhorn

Joined: Sep 04, 2007
Posts: 19
Yes, my hibernate.cfg.xml is as follows:

 
Consider Paul's rocket mass heater.
 
subject: org.hibernate.MappingException: Association references unmapped class com.db.Soundtracks
 
Similar Threads
Internal validation error
Problems occurred when invoking code from plug-in:"org.eclipse.core.resources".
Hibernate: InvalidMappingException: Could not parse mapping document from resource
Internal error occurs during building workspace ?
Unable to load properties file in Java using eclipse