Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

tf CLI never prints output on Windows 10, Mac OS High Sierra #255

Closed
latentstops opened this issue Feb 28, 2018 · 16 comments
Closed

tf CLI never prints output on Windows 10, Mac OS High Sierra #255

latentstops opened this issue Feb 28, 2018 · 16 comments

Comments

@latentstops
Copy link

latentstops commented Feb 28, 2018

Steps:

  1. Downloaded TEE-CLC-14.123.1.zip
  2. Extracted %USERPROFILE%\Documents\TEE-CLC-14.123.1
  3. cd %USERPROFILE%\Documents\TEE-CLC-14.123.1
  4. executed tf command - no output
  5. executed tf.cmd command - no output
  6. executed tf eula command - no output

Microsoft Windows [Version 10.0.14393]

@latentstops latentstops changed the title tf CLI never prints output tf CLI never prints output on Windows 10 Feb 28, 2018
@trumbitta
Copy link

Same thing on Mac OS High Sierra 👎

@jamescw
Copy link

jamescw commented Mar 21, 2018

+1 high sierra

@cynical89
Copy link

@trumbitta & @jamescw

The answer in this link solved this issue for me on High Sierra.
https://expicon.se/2017/10/13/tee-clc-not-working-on-mac/

Without clicking the link, line 147 of the tf file you need to add --add-modules java.xml.bind after exec java. The following code is how it looked in my file while it was working.

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 "$@"

@trumbitta
Copy link

@cynical89 yep for me too. Sorry I forgot to come back and update my comment!

@latentstops
Copy link
Author

Replacing exec java with exec java --add-modules java.xml.bind in tf file solves the problem on Windows 10 also. Thanks a lot!!!

@latentstops latentstops changed the title tf CLI never prints output on Windows 10 tf CLI never prints output on Windows 10, Mac OS High Sierra Mar 27, 2018
@trumbitta
Copy link

@latentstops I think you should keep this issue open until they don't fix it in the source code :)

@latentstops latentstops reopened this Apr 29, 2018
@filippoitaliano
Copy link

There's any plan to fix this issue?

@KrisJanssen
Copy link

KrisJanssen commented Jul 26, 2019

This issue is still not resolved... in fact, it would seem that in more recent version of the JDK, the required JAX-B Api's are not even available at runtime anymore...

As per: http://openjdk.java.net/jeps/320

More info here:

https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j

From these sources:

Another risk of removing the Java EE modules is that applications which already migrated from JDK 6, 7, or 8, to JDK 9, will not start if they use the command line flag --add-modules java.se.ee, --add-modules java.xml.bind, etc.

This proposal assumes that developers who wish to compile or run applications on the latest JDK can find and deploy alternate versions of the Java EE technologies. The Reference Implementations (RIs) of JAX-WS and JAXB are a good starting point because they are complete replacements for the java.xml.ws and java.xml.bind modules in JDK 9. The RIs are available as Maven artifacts: (note that they must be deployed on the class path)

com.sun.xml.ws : jaxws-ri (JAX-WS, plus SAAJ and Web Services Metadata)
com.sun.xml.bind : jaxb-ri (JAXB)

Is something being done to address this?

@ForNeVeR
Copy link

One possible workaround would be to define an environment variable TF_NOTELEMETRY=TRUE. According to my experiments, it should disable the telemetry and thus the need for javax.xml.bind. Could you try it, please?

@msasso69
Copy link

msasso69 commented Aug 5, 2019

Same problem on Linux, but with TF_NOTELEMETRY=TRUE (and java 11.0.2) works for me, Thanks

@OttoG
Copy link

OttoG commented Sep 11, 2019

The TF_NOTELEMETRY=TRUE should be the best workaround in most cases, but if for some reason solutions that require editing of configuration files or the tf/tf.cmd script file are not desired, it is also possible to download a JAR package and add it to the lib directory of TEE.

The following search should produce links to the current version of the jaxb-api package:

https://search.maven.org/search?q=g:javax.xml.bind%20AND%20a:jaxb-api

Download it as a JAR file (currently called "jaxb-api-2.4.0-b180830.0359.jar") and place the file in the TEE lib directory. This workaround seems to be effective under JDK 12.0.2 on macOS as well as Windows 10.

@HTMLangdon
Copy link

HTMLangdon commented Sep 13, 2019

Just so that this is completely clear for others who might not have experience.

If you have recently installed or updated to the latest version of Java/JDK/JRE (12 something?)
and are trying to run:

$ tf

you will [possibly] get no output, no readout - nothing. There's actually a behind the scenes error occurring, which are being logged in .log files.
Here are a list of terminal commands to check out the logs, and to update your tf shell script to fix the issues:

#cd to tf error log(s) dir:
$ cd ~/Library/Application Support/Microsoft/Team Foundation/4.0/
#open a finder window at the location of tf shell script:
#right click 'tf' and open with > VSCode, TextEdit, Sublime,  w/e floats your boat....
$ open /usr/local/Cellar/tee-clc/14.134.0/libexec/
# copy the following script, and select all / paste inside 'tf' shell script file (and save):
#!/bin/bash
TF_NOTELEMETRY=TRUE
exec "/usr/local/Cellar/tee-clc/14.134.0/libexec/tf" "$@"

Note: make a backup, or leave initial code in 'tf' shell script file as a comment to be safe.

After finishing the steps above, follow the instructions to get the .jar file per OttoG

OttoG
The following search should produce links to the current version of the jaxb-api package:

https://search.maven.org/search?q=g:javax.xml.bind%20AND%20a:jaxb-api

Download it as a JAR file (currently called "jaxb-api-2.4.0-b180830.0359.jar") and place the file in the TEE lib directory. This workaround seems to be effective under JDK 12.0.2 on macOS as well as Windows 10.

*Note:

...The _TEE lib directory...

run the following command in terminal, (if you used homebrew to install tee-clc):

open /usr/local/Cellar/tee-clc/14.134.0/libexec/lib/

this is the directory you need to place your downloaded .JAR file.

Additional Considerations:

To test, just type $ tf in your command line

If it just hangs there for more than 30seconds, then somethings' not right.

I found that these could be the issues for the hang-up:

  1. if your tf bash script didn't look like this:

exec "/usr/local/Cellar/tee-clc/14.134.0/libexec/tf" "$@"

then try resetting it back to what it was originally, and remove the variable:

TF_NOTELEMETRY=TRUE

attempt $ tf once more.

still hanging up, try adding TF_NOTELEMETRY=TRUE in the tf bash file on line 1, and the original contents on line 2.

Also, one other thing I did - as to not leave anything out - was I opened the .JAR file.. (double click)

it will say "cannot be opened" but hell.. who knows.. ;0) good luck!

annnd finally... if you're having connection issues to your TFS server:

This URL might help:

https://issues.jenkins-ci.org/browse/JENKINS-31233

@jessfdm-codes
Copy link

One possible workaround would be to define an environment variable TF_NOTELEMETRY=TRUE. According to my experiments, it should disable the telemetry and thus the need for javax.xml.bind. Could you try it, please?

This worked for me on OSX 10.14.6

@QuytNguyen
Copy link

One possible workaround would be to define an environment variable TF_NOTELEMETRY=TRUE. According to my experiments, it should disable the telemetry and thus the need for javax.xml.bind. Could you try it, please?

This worked, tks !!! macOS Catalina, java 1.8.0_251

@yehudamakarov
Copy link

setting TF_NOTELEMETRY=TRUE worked for me on mac

@Mrugendra27
Copy link

For me I had to download https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar
into the TF_CLC_HOME/lib directory where all the jars reside for the TEE-CLC.
Downloading any version >1.7.30 does not work.

eric-milles added a commit that referenced this issue Mar 23, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests