[jbosstools-issues] [JBoss JIRA] (JBIDE-13056) NPE when invoking Mapping diagram when model doesn't correspond with DB

Jiri Peterka (JIRA) jira-events at lists.jboss.org
Fri Nov 23 06:03:22 EST 2012


    [ https://issues.jboss.org/browse/JBIDE-13056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736627#comment-12736627 ] 

Jiri Peterka commented on JBIDE-13056:
--------------------------------------

Thing is that when Entities doesn't correspond with loaded DB model there should be some "nicer" Error given, not just raw NPE. You can reproduce it simply, just generate entities, add hbm.xml into hibernate console, than change hibernate console configuration to another database with another tables, rebuild hibernate console, expand and try to show mapping diagram. I agree it's not a critical issue.
                
> NPE when invoking Mapping diagram when model doesn't correspond with DB
> -----------------------------------------------------------------------
>
>                 Key: JBIDE-13056
>                 URL: https://issues.jboss.org/browse/JBIDE-13056
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: hibernate
>    Affects Versions: 4.0.0.Beta2
>         Environment: JBDS 6.0.0.Beta2,Linux 64
>            Reporter: Jiri Peterka
>            Assignee: Jiri Peterka
>             Fix For: 4.1.x, 4.0.x
>
>
> There is NPE when starting Mapping Diagram with different schemas
> {code}
> !ENTRY org.eclipse.ui 4 0 2012-11-13 12:13:06.965
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.NullPointerException
> 	at org.jboss.tools.hibernate.ui.diagram.editors.model.ElementsFactory.createForeingKeyConnections(ElementsFactory.java:81)
> 	at org.jboss.tools.hibernate.ui.diagram.editors.model.OrmDiagram.recreateChildren(OrmDiagram.java:231)
> 	at org.jboss.tools.hibernate.ui.diagram.editors.model.OrmDiagram.<init>(OrmDiagram.java:156)
> 	at org.jboss.tools.hibernate.ui.view.DiagramEditorInput.createOrmDiagram(DiagramEditorInput.java:68)
> 	at org.jboss.tools.hibernate.ui.view.DiagramEditorInput.<init>(DiagramEditorInput.java:64)
> 	at org.jboss.tools.hibernate.ui.view.OpenDiagramActionDelegate.openEditor(OpenDiagramActionDelegate.java:127)
> 	at org.jboss.tools.hibernate.ui.view.OpenDiagramActionDelegate.run(OpenDiagramActionDelegate.java:105)
> 	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> 	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$5.handleEvent(ActionContributionItem.java:411)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
> 	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
> 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
> 	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
> 	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> 	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
> 	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> 	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> 	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> 	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> 	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> 	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> 	at org.eclipse.swtbot.eclipse.core.UITestApplication.start(UITestApplication.java:54)
> 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> 	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:353)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list