Community
Participate
Working Groups
Version: Mars.1 Release (4.5.1) Build id: 20150924-1200 Team->Share Project causes null pointer exception. Project itself is located on a Remote system (created via "Create Remote Project" on Remote system Explorer). I suspect this is the cause of the bug. Error log below: !ENTRY org.eclipse.jface 4 2 2015-11-13 12:37:45.417 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface". !STACK 0 java.lang.NullPointerException at org.eclipse.egit.ui.internal.sharing.MoveProjectsLabelProvider.getColumnText(MoveProjectsLabelProvider.java:42) at org.eclipse.jface.viewers.TableColumnViewerLabelProvider.update(TableColumnViewerLabelProvider.java:66) at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:154) at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:385) at org.eclipse.jface.viewers.CheckboxTableViewer.doUpdateItem(CheckboxTableViewer.java:169) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:473) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173) at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2176) at org.eclipse.jface.viewers.AbstractTableViewer.createItem(AbstractTableViewer.java:276) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:723) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:615) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:607) at org.eclipse.jface.viewers.AbstractTableViewer$1.run(AbstractTableViewer.java:567) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1462) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1423) at org.eclipse.jface.viewers.CheckboxTableViewer.preservingSelection(CheckboxTableViewer.java:344) at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:564) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1701) at org.eclipse.egit.ui.internal.sharing.ExistingOrNewPage.createControl(ExistingOrNewPage.java:255) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:175) at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:705) at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:597) at org.eclipse.jface.window.Window.create(Window.java:430) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1096) at org.eclipse.jface.window.Window.open(Window.java:792) at org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard.openWizard(ConfigureProjectWizard.java:224) at org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard.shareProjects(ConfigureProjectWizard.java:124) at org.eclipse.team.internal.ui.actions.ConfigureProjectAction$1.run(ConfigureProjectAction.java:39) at org.eclipse.team.internal.ui.actions.TeamAction$3.run(TeamAction.java:266) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.team.internal.ui.actions.TeamAction.run(TeamAction.java:263) at org.eclipse.team.internal.ui.actions.ConfigureProjectAction.execute(ConfigureProjectAction.java:33) at org.eclipse.team.internal.ui.actions.TeamAction.run(TeamAction.java:515) at org.eclipse.team.internal.ui.actions.TeamAction.runWithEvent(TeamAction.java:549) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:237) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
(In reply to Ed Darnell from comment #0) > Team->Share Project causes null pointer exception. > > Project itself is located on a Remote system (created via "Create Remote > Project" on Remote system Explorer). I suspect this is the cause of the bug. The immediate cause of the NPE is that EGit uses the location of project, not the locationURI. So if a project is located on an EFS, we'll get that NPE. AFAIK, the RSE uses an EFS to map the remote system. However, the problem goes deeper: to "share a project", EGit moves it into the git working directory of the git repository. The javadoc of IResource.move() states that it'll raise a CoreException if the resource or one of its descendants is non-local. So I suspect even if the immediate issue was corrected, we'd just run into a CoreException during the actual move. @Ed: is it possible to move that remote project to the local file system at all? Perhaps the whole operation should not be offered by EGit for non-local projects. See also http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.rse.doc.user%2Ftasks%2Ftusingefs.html: "Pure RSE/EFS projects (i.e. where the .project file is on the remote system) are currently not supported due to low-level interactions between EFS, the Eclipse platform, and the RSE caching mechanism. Purely remote projects will not open automatically on Eclipse startup. However, one can link lower-level folders of a project to an EFS provider, allowing a project to contain a mix of remote and local resources. Note that team support (such as that provided by CVS) will not synchronize resources linked through an EFS provider at this time."