[hibernate-issues] [Hibernate-JIRA] Reopened: (HBX-697) NPE when attempting to view entity with null valued, joined properties
Max Rydahl Andersen (JIRA)
noreply at atlassian.com
Mon Aug 14 20:06:19 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=all ]
Max Rydahl Andersen reopened HBX-697:
-------------------------------------
> NPE when attempting to view entity with null valued, joined properties
> ----------------------------------------------------------------------
>
> Key: HBX-697
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697
> Project: Hibernate Tools
> Type: Bug
> Components: eclipse
> Versions: 3.2beta6
> Environment: eclipse.buildId=M20060629-1905
> java.version=1.5.0_07
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
> Command-line arguments: -os linux -ws gtk -arch x86_64
> Reporter: Jacob L E Blain Christen
> Priority: Minor
> Fix For: 3.2LATER
> Attachments: HibernatePropertySourceProvider.patch, hbtools697.sql, hbtools697.zip
>
>
> I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =(
> This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping:
> <join optional="true" table="item_instruments">
> <key column="item" unique="true" />
> <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" />
> </join>
> <join optional="true" table="item_stackables">
> <key column="item" unique="true"/>
> <property name="stackSize" column="stacksize" type="java.lang.Short" />
> </join>
> If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem):
> java.lang.NullPointerException
> at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23)
> at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47)
> at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36)
> at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470)
> at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759)
> at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622)
> at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575)
> at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767)
> at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943)
> at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473)
> at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218)
> at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
> at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62)
> at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151)
> at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212)
> at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207)
> at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201)
> at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
> 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.Viewer.fireSelectionChanged(Viewer.java:160)
> at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976)
> at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128)
> at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154)
> at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213)
> at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207)
> at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
> 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)
--
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.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list