locked
NullPointerException when attempting to connect to TFS server

    Question

  • Today when I started up eclipse, I realized that eclipse did not auto connect to the TFS server. When I manually try to connect to Team Foundation Server, I see the Team Project Collections, and when I click on the collection, I see the appropriate team projects on the right side. When I select the team project that I want and click Finish, I get a java.lang.NullPointerException error. 

    The actual dialog says Error occurred in wizard completion. More details are available in the Eclipse Platform log.

    The exception in the platform log is:

    !ENTRY org.eclipse.ui 4 0 2013-05-20 15:56:16.882
    !MESSAGE Unhandled event loop exception
    !STACK 0
    java.lang.NullPointerException
    at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.WorkspaceInfo.loadFromXML(WorkspaceInfo.java:281)
    at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCache.load(InternalCache.java:594)
    at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCache.load(InternalCache.java:529)
    at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCacheLoader.loadConfig(InternalCacheLoader.java:118)
    at com.microsoft.tfs.core.clients.versioncontrol.Workstation.<init>(Workstation.java:150)
    at com.microsoft.tfs.core.clients.versioncontrol.Workstation.getCurrent(Workstation.java:206)
    at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:450)
    at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:520)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:238)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:91)
    at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1470)
    at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:359)
    at com.microsoft.tfs.client.common.commands.QueryLocalWorkspacesCommand.<init>(QueryLocalWorkspacesCommand.java:46)
    at com.microsoft.tfs.client.eclipse.ui.wizard.connectwizard.EclipseConnectWizard.getCurrentWorkspaces(EclipseConnectWizard.java:132)
    at com.microsoft.tfs.client.eclipse.ui.wizard.teamprojectwizard.EclipseTeamProjectWizard.doPerformFinish(EclipseTeamProjectWizard.java:132)
    at com.microsoft.tfs.client.common.ui.framework.wizard.ExtendedWizard.performFinish(ExtendedWizard.java:530)
    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at com.microsoft.tfs.client.common.ui.teamexplorer.helpers.ConnectHelpers.connectToServer(ConnectHelpers.java:30)
    at com.microsoft.tfs.client.common.ui.teamexplorer.pages.TeamExplorerHomePage$4.linkActivated(TeamExplorerHomePage.java:155)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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)

    Monday, May 20, 2013 8:57 PM

Answers

  • That's very odd.  It's possible that the workspace cache file has become corrupted somehow.  Can you exit eclipse and delete the following file:

    %LOCALAPPDATA%\Microsoft\Team Foundation\4.0\Cache\VersionControl.config

    And see if you are then able to connect?

    • Marked as answer by TJ Tang Tuesday, May 21, 2013 4:54 AM
    Monday, May 20, 2013 9:25 PM
    Moderator

All replies

  • That's very odd.  It's possible that the workspace cache file has become corrupted somehow.  Can you exit eclipse and delete the following file:

    %LOCALAPPDATA%\Microsoft\Team Foundation\4.0\Cache\VersionControl.config

    And see if you are then able to connect?

    • Marked as answer by TJ Tang Tuesday, May 21, 2013 4:54 AM
    Monday, May 20, 2013 9:25 PM
    Moderator
  • Thanks a lot. That solved my issue. I guess that file was corrupted somehow when I was playing with IntelliJ last Friday. Visual Studio was still able to connect with no issues. Do you know if Visual Studio uses the same file?

    Tuesday, May 21, 2013 4:55 AM
  • Thank you - deleting the file is still the fix for this particular show stopper.

    Much obliged!

    Thursday, January 30, 2014 5:51 PM
  •  What if i did not find the file? how can i solve this exception?
    Monday, May 26, 2014 12:18 PM
  • Hi,

    That file should exist once you used TEE at least once to connect to TFS. are you getting the same exception with the same stack trace?

    Thanks

    Mireille

    Thursday, May 29, 2014 3:40 PM
    Moderator
  • When I tried to delete that file, I am getting below error as

    " There was a problem sending the command to the program".

    Please help me in resolving it.

    I am using Neon same error,I tried with JBOSS developer still the same error. Please help me in resolving it.

    Tuesday, October 31, 2017 4:47 AM