[OS-JIRA] Created: (WOL-1178) Modeller; if an entity has no primary key then attempting to create a relationship to it can result in a runtime exception

From: Andrew Lindesay (JIRA) ("Andrew)
Date: Tue Oct 05 2010 - 21:21:19 UTC

  • Next message: David Holt: "Re: Questions to new WonderEntity templates"

    Modeller; if an entity has no primary key then attempting to create a relationship to it can result in a runtime exception
    --------------------------------------------------------------------------------------------------------------------------

                     Key: WOL-1178
                     URL: http://issues.objectstyle.org/jira/browse/WOL-1178
                 Project: WOProject/WOLips
              Issue Type: Bug
              Components: WOLips General
                Reporter: Andrew Lindesay

    Effects 3.6 (trunk)

    If an entity exists with no key attribute (another bug may have resulted in this, but I am not sure) then attempting to create a new relationship to that entity results in a runtime exception. This happens when you actually attempt to create the relationship.

    org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
            at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:519)
            at org.objectstyle.wolips.eomodeler.editors.entity.CreateRelationshipDialog.okPressed(CreateRelationshipDialog.java:568)
            at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
            at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
            at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
            at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
            at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
            at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
            at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
            at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
            at org.eclipse.jface.window.Window.open(Window.java:801)
            at org.objectstyle.wolips.eomodeler.actions.NewRelationshipAction.run(NewRelationshipAction.java:77)
            at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
            at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
            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.Display.sendEvent(Display.java:3776)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
            at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
            at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
            at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
            at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
            at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
            at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
            at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
            at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
            at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
            at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
            at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
            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:369)
            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:619)
            at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
            at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    Caused by: java.util.NoSuchElementException
            at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
            at java.util.HashMap$KeyIterator.next(HashMap.java:828)
            at org.objectstyle.wolips.eomodeler.core.model.EOEntity.getSinglePrimaryKeyAttribute(EOEntity.java:420)
            at org.objectstyle.wolips.eomodeler.core.model.EOEntity.createForeignKeyTo(EOEntity.java:425)
            at org.objectstyle.wolips.eomodeler.actions.NewOneToManyRelationshipOperation.execute(NewOneToManyRelationshipOperation.java:79)
            at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
            ... 48 more

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.objectstyle.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Tue Oct 05 2010 - 21:22:20 UTC