facebook

Problems with Hibernate "A session factory for this con

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #311299 Reply

    denma
    Member

    “A session factory for this configuration could not be built. … Queries cannot be executed….Association references unmapped class…

    From the .log:

    !ENTRY org.hibernate.eclipse.console 4 4 2010-09-14 17:47:57.661
    !MESSAGE Association references unmapped class: org.stjude.taxupdater.Tfeatureattribute
    !SUBENTRY 1 org.hibernate.eclipse.console 4 150 2010-09-14 17:47:57.661
    !MESSAGE org.hibernate.MappingException: Association references unmapped class: org.stjude.taxupdater.Tfeatureattribute
    !STACK 0
    org.hibernate.MappingException: Association references unmapped class: org.stjude.taxupdater.Tfeatureattribute
    at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2380)
    at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2662)
    at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
    at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:395)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
    at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:390)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildSessionFactory(MEConsoleConfiguration.java:234)
    at com.genuitec.eclipse.hibernate.action.MERefreshCCAction.buildSessionFactory(MERefreshCCAction.java:121)
    at com.genuitec.eclipse.hibernate.action.MEExecuteHQLAction.run(MEExecuteHQLAction.java:67)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    !SUBENTRY 2 org.hibernate.eclipse.console 4 150 2010-09-14 17:47:57.661
    !MESSAGE org.hibernate.MappingException: Association references unmapped class: org.stjude.taxupdater.Tfeatureattribute
    !STACK 0
    org.hibernate.MappingException: Association references unmapped class: org.stjude.taxupdater.Tfeatureattribute
    at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2380)
    at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2662)
    at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
    at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:395)
    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
    at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
    at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:390)
    at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildSessionFactory(MEConsoleConfiguration.java:234)
    at com.genuitec.eclipse.hibernate.action.MERefreshCCAction.buildSessionFactory(MERefreshCCAction.java:121)
    at com.genuitec.eclipse.hibernate.action.MEExecuteHQLAction.run(MEExecuteHQLAction.java:67)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

    I have checked and double checked that that class tfeatureAttribute has an hbm.xml file, a persistance class and a DAO. It is referenced in multiple many to one mappings in the other hbm.xml files and the master hibernate.config.xml class….. so what’s the problem???

    I used reverse engineering and checked the include all forward and backwards checkboxes, so it brought in a whole ton of mappings.

    #311304

    denma,
    Can you give us some more information on this?
    1. Can you copy paste your installation details from MyEclipse > Installation Summary > Installation Detatils>
    2. What is the verion of Hibernate that you are using?
    3. Are there any many-to-many mappings defined on your table?
    Can you go through the following links and check if they are related –
    1. https://forum.hibernate.org/viewtopic.php?p=2271721&sid=755ae857b0801e0cff7bb911baf908f0
    2. https://forums.hibernate.org/viewtopic.php?p=2244776&sid=65bee1a4831e0b5b53de74ddf19df18e

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Problems with Hibernate "A session factory for this con

You must be logged in to post in the forum log in