locked
Windows 10 authentications issues with TFS SDK for Java RRS feed

  • Question

  • I am moving a runnable jar have created from Windows 7 to Windows 10. When I run it on Windows 7 it connects successfully to TFS and completes execution. On Windows 10 I get the following stack trace (sensitive information removed):

    WARN  [main] TFSTeamProjectCollection - Error getting data provider
    com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server http://tfs/ (authenticating as xxxxxx)
            at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:72)
            at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
            at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
            at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
            at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
            at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
            at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
            at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
            at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
            at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:896)
            at com.microsoft.tfs.core.config.client.DefaultClientFactory$9.newClient(DefaultClientFactory.java:254)
            at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:86)
            at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1459)
            at com.microsoft.tfs.core.TFSTeamProjectCollection.getWorkItemClient(TFSTeamProjectCollection.java:387)
    Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException: Authorization failure connecting to 'http://tfs/tfsTPC/Services/v1.0/Registration.asmx' (authenticating as xxxxxx)
            at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineHeadersForFederatedAuthURL(SOAPService.java:1065)
            at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:650)
            at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:444)
            at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:106)
            at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:58)
            ... 14 more

    I verified that the same version of Java is being used on both windows 7 and windows 10. It's running:

    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

    I'm not really sure where to even look from here. Any suggestions would be much appreciated! Thanks!

    Thursday, April 20, 2017 3:08 PM

All replies

  • Hi Kevin,

    What’s the version of SDK?

    Do you specify Native library location?

    Regards

    Starain


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 21, 2017 8:41 AM
    Moderator
  • I'm specifying the library location by using the "System.setProperty" method. As follows:

    System.setProperty("com.microsoft.tfs.jni.native.base-directory", "C:\\native");

    I'm using TFS-SDK-11.0.0.1306
    • Edited by Kevin Kaske Friday, February 16, 2018 10:18 PM Including SDK Version
    Friday, February 16, 2018 10:16 PM
  • Hi,

    What's the result if you specify Native library location through UI? You can try it with the newest version of TFS JAVA sdk and check the result. https://github.com/Microsoft/team-explorer-everywhere/releases

    On the other hand, I recommend you open the new thread on StackOverflow with TFS tag. 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 12, 2018 6:09 AM
    Moderator