java.lang.ClassCastException: org.eclipse.papyrus.uml.diagram.usecase.figure.AssociationFigure cannot be cast to org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure

Stack Overflow | Paul | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Eclipse/Technical errors while working on UML model in Papyrus 2.0

    Stack Overflow | 8 months ago | Paul
    java.lang.ClassCastException: org.eclipse.papyrus.uml.diagram.usecase.figure.AssociationFigure cannot be cast to org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.eclipse.papyrus.uml.diagram.usecase.figure.AssociationFigure cannot be cast to org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure

      at org.eclipse.gmf.tooling.runtime.linklf.policies.LinksLFGraphicalNodeEditPolicy.getConnectionCompleteCommand()
    2. org.eclipse.gmf
      LinksLFGraphicalNodeEditPolicy.getConnectionCompleteCommand
      1. org.eclipse.gmf.tooling.runtime.linklf.policies.LinksLFGraphicalNodeEditPolicy.getConnectionCompleteCommand(LinksLFGraphicalNodeEditPolicy.java:208)
      1 frame
    3. GMF Diagram UI
      GraphicalNodeEditPolicy.getConnectionAndRelationshipCompleteCommand
      1. org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.getConnectionAndRelationshipCompleteCommand(GraphicalNodeEditPolicy.java:744)
      1 frame
    4. org.eclipse.papyrus
      DefaultLinksLFEditPolicy.getConnectionAndRelationshipCompleteCommand
      1. org.eclipse.papyrus.uml.diagram.linklf.policy.graphicalnode.DefaultLinksLFEditPolicy.getConnectionAndRelationshipCompleteCommand(DefaultLinksLFEditPolicy.java:54)
      1 frame
    5. GMF Diagram UI
      GraphicalNodeEditPolicy.getCommand
      1. org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.getCommand(GraphicalNodeEditPolicy.java:597)
      1 frame
    6. Graphical Editing Framework
      AbstractEditPart.getCommand
      1. org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
      1 frame
    7. GMF Diagram UI
      GraphicalEditPart$1.run
      1. org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
      2. org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
      2 frames
    8. org.eclipse.papyrus
      PapyrusROTransactionalEditingDomain.runExclusive
      1. org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:271)
      1 frame
    9. GMF Diagram UI
      GraphicalNodeEditPolicy.getCommand
      1. org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
      2. org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.getConnectionMenuContent(GraphicalNodeEditPolicy.java:867)
      3. org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.getUnspecifiedConnectionCompleteCommand(GraphicalNodeEditPolicy.java:771)
      4. org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.getCommand(GraphicalNodeEditPolicy.java:599)
      4 frames
    10. Graphical Editing Framework
      AbstractEditPart.getCommand
      1. org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
      1 frame
    11. GMF Diagram UI
      GraphicalEditPart$1.run
      1. org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
      2. org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
      2 frames
    12. org.eclipse.papyrus
      PapyrusROTransactionalEditingDomain.runExclusive
      1. org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:271)
      1 frame
    13. GMF Diagram UI
      GraphicalEditPart.getCommand
      1. org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
      1 frame
    14. Graphical Editing Framework
      AbstractConnectionCreationTool.handleMove
      1. org.eclipse.gef.tools.TargetingTool.getCommand(TargetingTool.java:123)
      2. org.eclipse.gef.tools.AbstractConnectionCreationTool.handleMove(AbstractConnectionCreationTool.java:321)
      2 frames
    15. GMF Diagram UI
      ConnectionCreationTool.handleMove
      1. org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool.handleMove(ConnectionCreationTool.java:394)
      1 frame
    16. Graphical Editing Framework
      DomainEventDispatcher.dispatchMouseMoved
      1. org.eclipse.gef.tools.AbstractTool.mouseMove(AbstractTool.java:1182)
      2. org.eclipse.gef.EditDomain.mouseMove(EditDomain.java:287)
      3. org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:365)
      3 frames
    17. Graphical Editing Framework Draw2d
      LightweightSystem$EventHandler.mouseMove
      1. org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:543)
      1 frame
    18. RWT
      Display.readAndDispatch
      1. org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
      2. org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      3. org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410)
      4. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
      5. org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4228)
      6. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3816)
      6 frames
    19. Eclipse Workbench SWT
      PartRenderingEngine$4.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
      1 frame
    20. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      1 frame
    21. Eclipse Workbench SWT
      PartRenderingEngine.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
      1 frame
    22. Eclipse Workbench
      E4Workbench.createAndRunUI
      1. org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
      1 frame
    23. Eclipse UI
      Workbench$5.run
      1. org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
      1 frame
    24. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      1 frame
    25. Eclipse UI
      Workbench.createAndRunWorkbench
      1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
      1 frame
    26. Eclipse UI
      PlatformUI.createAndRunWorkbench
      1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
      1 frame
    27. Eclipse IDE
      IDEApplication.start
      1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
      1 frame
    28. Equinox Container
      EclipseAppHandle.run
      1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      1 frame
    29. Eclipse OSGi
      EclipseStarter.run
      1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
      4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
      4 frames
    30. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    31. Equinox
      Main.run
      1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
      2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
      3. org.eclipse.equinox.launcher.Main.run(Main.java:1519)
      3 frames