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 Everywhere) setup 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!
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!
[…] Follow this link to use tee with Java 9: TEE CLC not working on Mac – Expicon AB […]
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
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 “$@”
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.
hi I am struggling with this as I’m new to Macs. how did you edit the tf file? I installed it with brew so I can find it by going to usr/local/Cellar/tee-clc/14.134.0_1
I have the same issue in the logs, but I’m not sure which file to edit and how to do it. there is a tf in the bin folder, but im not sure how to edit it
Thanks
I managed to edit the file but I get the following error:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.xml.bind not found
I have installed jdk 10.0.2 but that didn’t fix it
Does anybody know how to get this working?
Thank you so much for writing this! After your thoughts and the comment from Chris, I was able to get VS Code working on my mac.
You saved both saved the day!