[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-903?page=co...
]
Joseph Marques commented on HBX-903:
------------------------------------
The actual exception was:
java.lang.NullPointerException
at some.long.package.name.here.Thing.toString(Thing.java:<some_line>)
at
org.hibernate.eclipse.console.views.QueryPageViewer$LabelProviderImpl.getColumnText(QueryPageViewer.java:77)
at org.eclipse.jface.viewers.TableViewer.doUpdateItem(TableViewer.java:486)
at
org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:465)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1955)
at org.eclipse.jface.viewers.TableViewer.createItem(TableViewer.java:350)
at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(TableViewer.java:923)
at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:818)
at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:807)
at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1388)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1323)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1386)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1345)
at org.eclipse.jface.viewers.TableViewer.inputChanged(TableViewer.java:767)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:250)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1542)
at
org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:208)
at
org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:187)
at
org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:145)
at
org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:109)
at
org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:73)
at
org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:83)
at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130)
at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:67)
at
org.hibernate.console.KnownConfigurations$1.queryPageCreated(KnownConfigurations.java:80)
at
org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:340)
at org.hibernate.console.ConsoleConfiguration.access$5(ConsoleConfiguration.java:336)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:312)
at
org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at
org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:304)
at org.hibernate.eclipse.hqleditor.HQLEditor.executeQuery(HQLEditor.java:396)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:72)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:52)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:56)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
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:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Better error-handling when executing jpql/hql statements
--------------------------------------------------------
Key: HBX-903
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-903
Project: Hibernate Tools
Type: New Feature
Versions: 3.2beta8
Reporter: Joseph Marques
i was written a query that used composite objects, such as:
select new Thing(elt1, elt2) from .....
and the class Thing had the following toString implementation:
public class Thing {
...
public Stirng toString() {
return elt1.toString + ", " + elt2.toString();
}
...
}
Most of the time elt2 has a valid value, but occassionally the model will return a valid
result where elt2 is null. Obviously, this is going to make the toString implementation
bomb with a NullPointerException - but I received one error for EVERY SINGLE RESULT ITEM
that has null in it. So, when I was querying several hundred objects, I basically just
sat on the return key (to accept the error msg boxes that popped up) until several dozen
of them were acknowledged.
I think it would be more intuitive to aggregate the exceptions by thrown location and
type, and then insert into the error log something like "Problems occured when
invoking code from plug-in: 'org.eclipse.jface' (56 times)" and then only
notify me with a single pop-up error msg box - instead of 56 errors in the log and 56
modal msg boxes that I have to accept before I can continue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira