TEE CLC not working on Mac

//TEE CLC not working on Mac

TEE CLC not working on Mac

Today I was setting up Visual Studio Code, with the Visual Studio Team Services plugin, to start developing on my new Mac.

I followed instructions on how to set it up, and finally found out how to get TF / TEE CLC (Team Explorer Everywheresetup and running.

However, when trying to run the tf command, nothing happens for a second, and then the command finishes with no output or anything.

Finally I found the log file path for TF / TEE CLC at

~/Library/Application%20Support/Microsoft/Team%20Foundation/4.0/Logs

Opening up the log showed me the following error:

2017-10-13 09:34:15,759 ERROR [main] (com.microsoft.tfs.client.clc.vc.Main) Unhandled exception reached Main:
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
        at ...

This JAXBException turns out to be caused by that version 9 and forward of Java does not include the JAX stuff libraries.

Finally with help from the link, I figured out that the problem is solved by editing the “tf” file (not the “tf.cmd”) by adding “–add-modules java.xml.bind” as an option to the call to java on the last line so it looks like this:

exec java --add-modules java.xml.bind -Xmx2048M -classpath "$CLC_CLASSPATH" $TF_ADDITIONAL_JAVA_ARGS \
	"-Dcom.microsoft.tfs.jni.native.base-directory=$BASE_DIRECTORY/native" \
    $RANDOM_DEVICE_PROPERTY com.microsoft.tfs.client.clc.vc.Main "$@"

And now it works!

By | 2017-10-13T10:11:33+00:00 October 13th, 2017|problem solving|5 Comments

About the Author:

I'm passionate about software development. Can't help it.

5 Comments

  1. Martyn January 11, 2018 at 9:44 pm - Reply

    I’ve just spent an hour looking for a solution to this problem – surprised there aren’t more reports of it.

    Anyway, thanks for taking the time to log your findings!

  2. My MacBook Setup – zacpwhite.com January 17, 2018 at 11:17 pm - Reply

    […] Follow this link to use tee with Java 9: TEE CLC not working on Mac – Expicon AB […]

  3. addison April 25, 2018 at 7:52 pm - Reply

    I’m still getting the error on MacOS 10.13.4. I checked the logs like you and get the same error. I added the same options to the java call at the end of tf file and still the same errors when I run tf. Anyone have any clue? (Thanks for the first insight into this problem I have found, I’ve been trying to get this running for months and had no clue why nothing happened when I ran tf from the command line previously)

    Here are the logs:

    2018-04-25 14:52:11,320 ERROR [main] (com.microsoft.tfs.client.clc.vc.Main) Unhandled exception reached Main:
    java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
    at com.microsoft.applicationinsights.internal.config.TelemetryConfigurationFactory.(TelemetryConfigurationFactory.java:65)
    at com.microsoft.applicationinsights.internal.config.TelemetryConfigurationFactory.(TelemetryConfigurationFactory.java:54)
    at com.microsoft.applicationinsights.TelemetryConfiguration.getActive(TelemetryConfiguration.java:72)
    at com.microsoft.tfs.core.telemetry.TfsTelemetryHelper.initializeTelemetryChannel(TfsTelemetryHelper.java:43)
    at com.microsoft.tfs.core.telemetry.TfsTelemetryHelper.getTelemetryClient(TfsTelemetryHelper.java:58)
    at com.microsoft.tfs.core.telemetry.TfsTelemetryHelper.sendSessionBegins(TfsTelemetryHelper.java:138)
    at com.microsoft.tfs.client.clc.Application.run(Application.java:153)
    at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:55)
    Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    … 8 more
    2018-04-25 14:52:11,321 INFO [main] (com.microsoft.tfs.client.clc.vc.Main) Shutting down
    2018-04-25 14:52:11,329 INFO [main] (com.microsoft.tfs.client.clc.vc.Main) Has shut down

  4. Ronen March 14, 2019 at 10:29 am - Reply

    I also had this issue with tfs version “TEE-CLC-14.134.0” on macOS High Sierra
    In addition to adding the JAX stuff i had to comment out the existing last line like this:

    #exec java -Xmx2048M -classpath “$CLC_CLASSPATH” $TF_ADDITIONAL_JAVA_ARGS \
    # “-Dcom.microsoft.tfs.jni.native.base-directory=$BASE_DIRECTORY/native” \
    # $RANDOM_DEVICE_PROPERTY com.microsoft.tfs.client.clc.vc.Main “$@”

  5. Chris June 18, 2019 at 5:23 pm - Reply

    Thanks very much for this clue!
    The fix you described did not work for me because I had installed Java 12 but, it helped me get on the right track.

    I ended up installing Java 8 and jenv via homebrew and then setting my default to Java 8.
    This, after hours of confusion, allowed TEE-CLC to work.

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.