Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350971

Summary: Deleting non-empty artifact folder causes NullPointerException
Product: [Technology] OSEE Reporter: S. Cook <shawn.f.cook>
Component: Action Tracking System (ATS)Assignee: John Misinco <misinco>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ryan.d.brooks
Version: 0.9.9   
Target Milestone: 0.9.9   
Hardware: All   
OS: All   
Whiteboard:

Description S. Cook CLA 2011-07-01 16:54:21 EDT
Steps to recreate the exception:
1. Open Artifact Explorer
2. Right click on a folder in the Art.Expl. that is NOT empty.
3. Select 'Delete Artifact'.
4. Select 'Yes' when asked "Are you sure you want to delete this artifact and all of the default hierarchy children?".
5. You receive the OSEE Error with the exception (see below).

Work around:
User can avoid this exception by manually deleting each child artifact inside the folder.



Exception trace:

java.lang.NullPointerException
  org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction.addArtifactAndAttributes(SkynetTransaction.java:228)
  org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction.addArtifact(SkynetTransaction.java:222)
  org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction.addRelation(SkynetTransaction.java:327)
  org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction.addRelations(SkynetTransaction.java:282)
  org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction.addArtifact(SkynetTransaction.java:223)
  org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction.addArtifact(SkynetTransaction.java:216)
  org.eclipse.osee.framework.skynet.core.artifact.Artifact.persist(Artifact.java:1024)
  org.eclipse.osee.framework.skynet.core.artifact.ArtifactPersistenceManager.deleteTrace(ArtifactPersistenceManager.java:190)
  org.eclipse.osee.framework.skynet.core.artifact.ArtifactPersistenceManager.deleteTrace(ArtifactPersistenceManager.java:182)
  org.eclipse.osee.framework.skynet.core.artifact.ArtifactPersistenceManager.deleteTrace(ArtifactPersistenceManager.java:182)
  org.eclipse.osee.framework.skynet.core.artifact.ArtifactPersistenceManager.deleteArtifactList(ArtifactPersistenceManager.java:151)
  org.eclipse.osee.framework.skynet.core.artifact.ArtifactPersistenceManager.deleteArtifact(ArtifactPersistenceManager.java:135)
  org.eclipse.osee.framework.ui.skynet.menu.GlobalMenu$1.run(GlobalMenu.java:158)
  org.eclipse.osee.framework.ui.skynet.menu.GlobalMenu$3.widgetSelected(GlobalMenu.java:128)
  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
  org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
  org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
  org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
  org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
  org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
  org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
  org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
  org.eclipse.equinox.launcher.Main.run(Main.java:1408)
  org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Comment 1 Ryan Brooks CLA 2012-01-28 19:54:18 EST
Fixed in commit "bug[ats_Z8H1L]: Recursive delete causes NullPointerException" on Sep 28, 2011 by John Misinco (a committer by that time).