Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313785 - Exception on running ChangeArtifactType BLAM - unique to one installation
Summary: Exception on running ChangeArtifactType BLAM - unique to one installation
Status: CLOSED FIXED
Alias: None
Product: OSEE
Classification: Technology
Component: BLAM (show other bugs)
Version: 0.9.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.4   Edit
Assignee: Ryan Brooks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 13:33 EDT by Mark D-B CLA
Modified: 2010-12-14 14:03 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark D-B CLA 2010-05-20 13:33:18 EDT
All our OSEE 0.9.1 users were installed from a common zip file.

However, one particular user's laptop, which has no obvious unique features, always gets the following when attempting to run the ChangeArtifactType BLAM:

For input string: ""
For input string: ""
  java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
  java.lang.Integer.parseInt(Integer.java:468)
  java.lang.Integer.parseInt(Integer.java:497)
  org.eclipse.osee.framework.skynet.core.artifact.BranchManager.initializeLastBranchValue(BranchManager.java:459)
  org.eclipse.osee.framework.skynet.core.artifact.BranchManager.getLastBranch(BranchManager.java:493)
  org.eclipse.osee.framework.ui.skynet.widgets.XTypeListViewer.resolveBranch(XTypeListViewer.java:41)
  org.eclipse.osee.framework.ui.skynet.widgets.XArtifactTypeListViewer.<init>(XArtifactTypeListViewer.java:29)
  org.eclipse.osee.framework.ui.skynet.widgets.workflow.XWidgetFactory.createXWidget(XWidgetFactory.java:273)
  org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData.getXWidget(DynamicXWidgetLayoutData.java:109)
  org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayout.createBody(DynamicXWidgetLayout.java:127)
  org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPage.createBody(WorkPage.java:129)
  org.eclipse.osee.framework.ui.skynet.blam.sections.BlamInputSection.createWidgets(BlamInputSection.java:97)
  org.eclipse.osee.framework.ui.skynet.blam.sections.BlamInputSection.updateDataPart(BlamInputSection.java:83)
  org.eclipse.osee.framework.ui.skynet.blam.sections.BlamInputSection.initialize(BlamInputSection.java:58)
  org.eclipse.ui.forms.ManagedForm.addPart(ManagedForm.java:84)
  org.eclipse.osee.framework.ui.skynet.blam.BlamOverviewPage.createFormContent(BlamOverviewPage.java:84)
  org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152)
  org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150)
  org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:465)
  org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1076)
  org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:597)
  org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:361)
  org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
  org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
  org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
  org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
  org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
  org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
  org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
  org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
  org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
  org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
  org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)
  org.eclipse.osee.framework.ui.skynet.blam.BlamEditor$2.run(BlamEditor.java:102)
  org.eclipse.osee.framework.ui.plugin.util.Displays.ensureInDisplayThread(Displays.java:27)
  org.eclipse.osee.framework.ui.plugin.util.Displays.ensureInDisplayThread(Displays.java:21)
  org.eclipse.osee.framework.ui.skynet.blam.BlamEditor.edit(BlamEditor.java:99)
  org.eclipse.osee.framework.ui.skynet.blam.BlamEditor.edit(BlamEditor.java:111)
  org.eclipse.osee.framework.ui.skynet.widgets.xnavigate.XNavigateItemBlam.run(XNavigateItemBlam.java:37)
  org.eclipse.osee.framework.ui.skynet.widgets.xnavigate.XNavigateComposite.handleDoubleClick(XNavigateComposite.java:217)
  org.eclipse.osee.ats.navigate.AtsNavigateComposite.handleDoubleClick(AtsNavigateComposite.java:92)
  org.eclipse.osee.ats.navigate.AtsNavigateComposite.handleDoubleClick(AtsNavigateComposite.java:59)
  org.eclipse.osee.framework.ui.skynet.widgets.xnavigate.XNavigateComposite$3.doubleClick(XNavigateComposite.java:103)
  org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:821)
  org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  org.eclipse.core.runtime.Platform.run(Platform.java:888)
  org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
  org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
  org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:819)
  org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1419)
  org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1195)
  org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238)
  org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235)
  org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296)
  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
  org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
  org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
  org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
  org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
  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:368)
  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:559)
  org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
  org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Comment 1 Ryan Schmitt CLA 2010-05-20 18:04:38 EDT
Are there any custom internationalization/regional/locale settings? They could be in the OS settings, the JVM settings, the command-line arguments to OSEE, etc. (I assume you've double-checked the validity of the inputs to the BLAM.)
Comment 2 Ryan Brooks CLA 2010-05-21 12:29:10 EDT
This issue is caused by an invalid branch id being stored on this particular user's user artifact.  BranchManager.initializeLastBranchValue attempts to resolve the last branch used by the user.  This information is stored in the attribute "User Settings" on the "User" artifact.

A work around would be to edit the "User Settings" for the portion "<item value="123" key="LastDefaultBranch"/>".  You may have to use Ctrl-A to select and then copy the value of the "User Settings" attribute so you can edit it in a text editor and then paste the result back in.

I will improve the code so it will automatically recover from this case.
Comment 3 Mark D-B CLA 2010-05-21 12:39:06 EDT
Thanks Ryan. Kevin is not in now so I'll try the workaround on Monday.
Is the problem likely to have been caused by committing a branch that was open in Artifact Explorer (just want to avoid it happening to another user until updated code is available)?
Comment 4 Ryan Brooks CLA 2010-05-21 12:43:37 EDT
The problem is that the "LastDefaultBranch" setting is set to the empty string "".  The case of a non-existent branch is handled gracefully.  I don't know how "" ever did get stored there, but committing branches should not do it.
Comment 5 Ryan Brooks CLA 2010-05-21 18:45:58 EDT
Changed BranchManager.initializeLastBranchValue() to gracefully recover from invalid last branch preferences.  Also it now uses the branch guid instead of the branch id.  This change was committed to trunk in revision 27780 and was also committed to the 0.9.4 branch.
Comment 6 Mark D-B CLA 2010-06-03 07:57:33 EDT
Hi Ryan, 

I am trying to paste the edited setting back into the "User Settings" attribute but it is only accepting the first line. Any ideas?

If you're interested, my previous settings were:
<?xml version="1.0" encoding="UTF-8"?>
<store id="ABAKw6f_nmWkZlUCV8QA">
<item value="AZMdgZtzuUzWtSej7KQA" key="Favorite Branch"/></store>

Regards, 
Kevin



(In reply to comment #2)
> This issue is caused by an invalid branch id being stored on this particular
> user's user artifact.  BranchManager.initializeLastBranchValue attempts to
> resolve the last branch used by the user.  This information is stored in the
> attribute "User Settings" on the "User" artifact.
> 
> A work around would be to edit the "User Settings" for the portion "<item
> value="123" key="LastDefaultBranch"/>".  You may have to use Ctrl-A to select
> and then copy the value of the "User Settings" attribute so you can edit it in
> a text editor and then paste the result back in.
> 
> I will improve the code so it will automatically recover from this case.
Comment 7 Mark D-B CLA 2010-06-03 08:22:37 EDT
Just realised I needed to CtrlA the "User Settings" atribute before I pasted the new settings in.

ChangeArtifactType BLAM appears to work now.

Thanks, 
Kevin


(In reply to comment #6)
> Hi Ryan, 
> 
> I am trying to paste the edited setting back into the "User Settings" attribute
> but it is only accepting the first line. Any ideas?
> 
> If you're interested, my previous settings were:
> <?xml version="1.0" encoding="UTF-8"?>
> <store id="ABAKw6f_nmWkZlUCV8QA">
> <item value="AZMdgZtzuUzWtSej7KQA" key="Favorite Branch"/></store>
> 
> Regards, 
> Kevin
> 
> 
> 
> (In reply to comment #2)
> > This issue is caused by an invalid branch id being stored on this particular
> > user's user artifact.  BranchManager.initializeLastBranchValue attempts to
> > resolve the last branch used by the user.  This information is stored in the
> > attribute "User Settings" on the "User" artifact.
> > 
> > A work around would be to edit the "User Settings" for the portion "<item
> > value="123" key="LastDefaultBranch"/>".  You may have to use Ctrl-A to select
> > and then copy the value of the "User Settings" attribute so you can edit it in
> > a text editor and then paste the result back in.
> > 
> > I will improve the code so it will automatically recover from this case.
Comment 8 Ryan Brooks CLA 2010-12-14 13:35:25 EST
OSEE 0.9.4 has been released
Comment 9 Ryan Brooks CLA 2010-12-14 14:03:28 EST
OSEE 0.9.4 has been released.