[Hibernate 3.1, tools 3.1, oracle 10gR2]
I'm pretty new to the hibernate tools, and I've tried looking through the docs and google for help on this one, to no avail. Can any of the user's out there lend a hand?
I'm getting an exception whenever I try to use the Eclipse HQL worksheet (of if I just double-click a mapped object) that prevents me from testing queries.
When I double-click, I get the following stack trace (I was able to successfully reverse-engineer and examine the DB, etc.):
Code:
java.lang.NullPointerException
at org.hibernate.impl.SessionFactoryImpl.getReturnAliases(SessionFactoryImpl.java:621) at org.hibernate.impl.AbstractQueryImpl.getReturnAliases(AbstractQueryImpl.java:156)
at org.hibernate.console.HQLQueryPage.getPathNames(HQLQueryPage.java:95)
at org.hibernate.eclipse.console.views.QueryPageViewer.addColumnsToTable(QueryPageViewer.java:215)
at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:170)
at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:153)
at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:111)
at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:88)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:52)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:62)
at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130)
at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:50)
at org.hibernate.console.KnownConfigurations$1.queryPageCreated(KnownConfigurations.java:60)
at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:306)
at org.hibernate.console.ConsoleConfiguration.access$5(ConsoleConfiguration.java:302)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:295)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:287)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:282)
at org.hibernate.eclipse.console.views.KnownConfigurationsView$3.run(KnownConfigurationsView.java:133)
at org.hibernate.eclipse.console.views.KnownConfigurationsView$1.doubleClick(KnownConfigurationsView.java:77)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:720)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:718)
at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:950)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1057)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:219)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:216)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:275)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
When I try to create my own query in the HQL worksheet, such as...
"from AccountProfile"
The dynamic SQL translator correctly translates this to the following query...
Code:
select
accountpro0_.BO_ID as BO1_1296_,
accountpro0_.BO_CLIENT_ID as BO2_1296_,
accountpro0_.BRANCH_CD as BRANCH3_1296_,
accountpro0_.ACCOUNT_CD as ACCOUNT4_1296_,
accountpro0_.RR_CD as RR5_1296_,
accountpro0_.CREATE_DT as CREATE6_1296_,
accountpro0_.CHANGE_DT as CHANGE7_1296_,
accountpro0_.SSN_TAX_ID_1 as SSN8_1296_,
accountpro0_.SSN_TAX_ID_2 as SSN9_1296_,
accountpro0_.PRIMARY_FIRST_NM as PRIMARY10_1296_,
accountpro0_.PRIMARY_LAST_NM as PRIMARY11_1296_,
accountpro0_.SECONDARY_FIRST_NM as SECONDARY12_1296_,
accountpro0_.SECONDARY_LAST_NM as SECONDARY13_1296_,
accountpro0_.COMPANY_NM as COMPANY14_1296_,
accountpro0_.NAME_SEARCH_KEY as NAME15_1296_,
accountpro0_.EMAIL as EMAIL1296_,
accountpro0_.IP_NBR as IP17_1296_,
accountpro0_.RELA_NBR as RELA18_1296_,
accountpro0_.UNRECONCILED_IND as UNRECON19_1296_,
accountpro0_.XML_DATA_TXT as XML20_1296_
from
TV.ACCOUNT_PROFILE accountpro0_
Then, upon manual execution, I get the same stack trace and error as above.
Code:
java.lang.NullPointerException
at org.hibernate.impl.SessionFactoryImpl.getReturnAliases(SessionFactoryImpl.java:621)
at org.hibernate.impl.AbstractQueryImpl.getReturnAliases(AbstractQueryImpl.java:156)
at org.hibernate.console.HQLQueryPage.getPathNames(HQLQueryPage.java:95)
at org.hibernate.eclipse.console.views.QueryPageViewer.addColumnsToTable(QueryPageViewer.java:215)
at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:170)
at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:153)
at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:111)
at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:88)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:52)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:62)
at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130)
at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:50)
at org.hibernate.console.KnownConfigurations$1.queryPageCreated(KnownConfigurations.java:60)
at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:306)
at org.hibernate.console.ConsoleConfiguration.access$5(ConsoleConfiguration.java:302)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:295)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:287)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:134)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:116)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:120)
at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:222)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:228)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
as well as another one (with no trace)
"Unhandled event loop exception"
Thanks so much,
Matt