Exception dialog shown when trying to join entities with no PKs set - should show a more meaningful error
---------------------------------------------------------------------------------------------------------
Key: WOL-983
URL: http://issues.objectstyle.org/jira/browse/WOL-983
Project: WOProject/WOLips
Issue Type: Bug
Components: wolips
Affects Versions: AgentJ
Environment: build 3.4.5708
Reporter: Timo Höpfner
Priority: Trivial
Created new EOModel, created two new Entities, added columns, but forgot to set the PK on both of them.
Then, I tried to create a relationship between the two Entities. Clicking OK in the Relationship wizard then threw the exception below.
Subsequent saving immediately informed me on my mistake and after fixing, everything was fine again.
The exception should be replaced with a more meaningful error.
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:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3488)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3074)
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:76)
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:583)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
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.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3488)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3074)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
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:386)
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:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Caused by: java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
at java.util.HashMap$KeyIterator.next(HashMap.java:877)
at org.objectstyle.wolips.eomodeler.core.model.EOEntity.getSinglePrimaryKeyAttribute(EOEntity.java:416)
at org.objectstyle.wolips.eomodeler.core.model.EOEntity.createForeignKeyTo(EOEntity.java:421)
at org.objectstyle.wolips.eomodeler.actions.NewOneToManyRelationshipOperation.execute(NewOneToManyRelationshipOperation.java:79)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
... 46 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 : Fri Mar 27 2009 - 10:39:15 EDT