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

Bug 238368

Summary: error on finish in repository settings
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Mylyn Inbox <mylyn-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 Keywords: helpwanted
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Steffen Pingel CLA 2008-06-24 22:39:11 EDT
I found this exception in the error log when selecting finish in the repository settings dialog. Is it necessary to invoke getXPlannerClient() at that point or could you also call it "on demand", e.g. when a query is run? It seemed to block the UI thread for a moment.

java.lang.NullPointerException
at org.eclipse.mylyn.xplanner.ui.XPlannerRepositoryUtils.validateRepository(XPlannerRepositoryUtils.java:700)
at org.eclipse.mylyn.xplanner.ui.XPlannerRepositoryUtils.checkRepositoryValidated(XPlannerRepositoryUtils.java:687)
at org.eclipse.mylyn.xplanner.ui.XPlannerClientFacade.getXPlannerClient(XPlannerClientFacade.java:59)
at org.eclipse.mylyn.xplanner.ui.XPlannerClientFacade.repositoryAdded(XPlannerClientFacade.java:129)
at org.eclipse.mylyn.xplanner.ui.XPlannerClientFacade.repositorySettingsChanged(XPlannerClientFacade.java:147)
at org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager.notifyRepositorySettingsChanged(TaskRepositoryManager.java:332)
at org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager$1.propertyChange(TaskRepositoryManager.java:65)
at org.eclipse.mylyn.tasks.core.TaskRepository.notifyChangeListeners(TaskRepository.java:746)
at org.eclipse.mylyn.tasks.core.TaskRepository.setProperty(TaskRepository.java:739)
at org.eclipse.mylyn.tasks.core.TaskRepository.setCredentials(TaskRepository.java:647)
at org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage.applyTo(AbstractRepositorySettingsPage.java:1277)
at org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard.performFinish(EditRepositoryWizard.java:72)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1154)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3398)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3030)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.mylyn.tasks.ui.TasksUiUtil.openEditRepositoryWizard(TasksUiUtil.java:190)
at org.eclipse.mylyn.internal.tasks.ui.actions.EditRepositoryPropertiesAction.run(EditRepositoryPropertiesAction.java:37)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
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$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1154)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3398)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3030)
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:112)
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:382)
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:597)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Comment 1 Helen Bershadskaya CLA 2008-06-25 14:12:23 EDT
I probably could call it on demand -- I just wanted to make sure that when the dialog closes, the credentials are actually valid -- I believe this covers the case when the dialog is closed without the validate button being pressed.
Comment 2 Steffen Pingel CLA 2008-06-26 20:45:54 EDT
The problem is that there is no feedback in the UI at that point and the user can not cancel out of the validation. A good rule of thumb is that if there is no progress monitor no network access should be performed. Is it really necessary to force validation? I think we need to always handle the case of authentication failures since credentials can get lost (e.g. if the keystore is deleted) or passwords can change on the repository.

The JIRA and Trac connector implement password prompting in those cases. We could consider adding that for XPlanner as well.
Comment 3 Helen Bershadskaya CLA 2008-06-27 13:08:31 EDT
Ok, I can take a look at the Jira and Trac implementations and see if I can do something similar for XPlanner.

Thansk for the suggestion.
Comment 4 Steffen Pingel CLA 2011-11-23 05:30:34 EST
The XPlanner connector is no longer being maintained and supported as part of the Mylyn project. If you require support for the XPlanner connector please consider options provided by 3rd parties: http://eclipse.org/mylyn/support/.