Topic
1 reply Latest Post - ‏2013-12-06T15:47:55Z by LaraZiosi
chbrehm
chbrehm
1 Post
ACCEPTED ANSWER

Pinned topic RSA 9.0: NullPointerException when editing class diagram

‏2013-11-12T09:22:33Z |

I have an issue when editing a class diagram in RSA 9.0. Steps to reproduce the problem:

- Create an empty class diagram

- Drag a Java class with a generic field onto the diagram (for example, a class with a List<Integer> field will do).

- Click onto the generic field, you'll get a NullPointerException

It gets worse:
- Drag the generic field from the displayed class onto a blank area of the diagram. The class (in the example, Integer) will be displayed along with the association between the two classes.

- Now close the diagram and reopen. It won't display anymore, you get the same NPE as above.

At this point, the diagram is gone and can't be reopened anymore.

This is the stack trace:

java.lang.NullPointerException
    at com.ibm.xtools.viz.j2se.ui.internal.util.J2SEUtil.getFieldDisplayString(J2SEUtil.java:398)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.field.TypeField.getDisplayString(TypeField.java:93)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.field.TypeSelectionField.refresh(TypeSelectionField.java:230)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.section.TypedElementGeneral.refreshRows(TypedElementGeneral.java:67)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.section.FieldGeneral.refreshRows(FieldGeneral.java:71)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.section.GeneralSection.refreshRows(GeneralSection.java:221)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.section.GeneralSection$1$1.run(GeneralSection.java:180)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.section.GeneralSection$1$2.doExecute(GeneralSection.java:189)
    at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.section.GeneralSection$1.run(GeneralSection.java:195)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
    at com.ibm.xtools.viz.j2se.ui.internal.properties.section.GeneralSection.refresh(GeneralSection.java:206)
    at org.eclipse.ui.views.properties.tabbed.TabContents$6.run(TabContents.java:217)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.ui.views.properties.tabbed.TabContents.refresh(TabContents.java:220)
    at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:222)
    at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
    at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
    at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1725)
    at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:394)
    at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:736)
    at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:555)
    at org.eclipse.gmf.runtime.diagram.ui.properties.views.PropertiesBrowserPage.selectionChanged(PropertiesBrowserPage.java:253)
    at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:365)
    at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyPostSelectionListeners(SelectionService.java:173)
    at org.eclipse.ui.internal.e4.compatibility.SelectionService.access$4(SelectionService.java:170)
    at org.eclipse.ui.internal.e4.compatibility.SelectionService$2.selectionChanged(SelectionService.java:86)
    at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$4.run(SelectionAggregator.java:156)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyPostListeners(SelectionAggregator.java:154)
    at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$8(SelectionAggregator.java:151)
    at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$8$1.run(SelectionAggregator.java:253)
    at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:53)
    at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$8.changed(SelectionAggregator.java:251)
    at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:110)
    at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:328)
    at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:342)
    at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setPostSelection(SelectionServiceImpl.java:34)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$3.selectionChanged(CompatibilityPart.java:126)
    at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:256)
    at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:234)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
    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.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:88)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:613)
    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)
 

  • LaraZiosi
    LaraZiosi
    12 Posts
    ACCEPTED ANSWER

    Re: RSA 9.0: NullPointerException when editing class diagram

    ‏2013-12-06T15:47:55Z  in response to chbrehm

    Hello,

    I believe that this is likely due to the following defect:

    APAR PM93463 Opening class diagram (.dnx) results in NullPointerException

    Check the upcoming update of RSA v9 for the resolution. If you need more information, please contact Rational Client Support.

    Thank you and regards, Lara