tabcmd on Linux for Tableau Online - Java Installation Requirements

Version 1

    I found myself quite frustrated installing tabcmd on a Linux server for connection to my client's Tableau online site.


    Through trial and error I determined the necessary Java requirements which are not documented in the tabcmd Linux installation instructions.   


    Additionally, common Tableau Server Install issues document make no mention of Java or Java related errors.


    The following documents my installation and execution failures so that if another user searches for similar errors, they will find this article.


    The short version is: Java 8 is required for tabcmd to run on a Linux installation. This solution was tested on Ubuntu 14.04 and 18.04. My working and installed Java distribution is OpenJDK 8.



    Output from java -version :


    openjdk version "1.8.0_171"

    OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-2~14.04-b11)

    OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)


    Detailed explanation:


    1) Beginning with an Ubuntu 14.04 server, I installed tabcmd per instructions and attempted to execute. Execution failed due to no Java installed. Again, installation documentation for tabcmd makes no mention of Java requirements.



    Cannot find 'java' in your PATH. Install 'java' and make sure it is in your PATH to continue.


    2) Attempted to install default OpenJDK version of Java for Ubuntu 14.04 (still a supported LTS release until April 2019). Attempted to run tabcmd again.



    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/tableausoftware/tabcmd/Tabcmd : Unsupported major.minor version 52.0


    This indicates that the version of Java installed is not compatible with something inside tabcmd. A Google search for this specific major.minor version might lead to errant resources that indicate that Java 8 is installed. However, an output of java -version shows as seen below that the actual OpenJDK version installed as default for 14.04 is Java 7.


    Output from java -version :


    java version "1.7.0_181"

    OpenJDK Runtime Environment (IcedTea 2.6.14) (7u181-2.6.14-0ubuntu0.3)

    OpenJDK 64-Bit Server VM (build 24.181-b01, mixed mode)


    3) In an attempt to resolve this, decided to upgrade Java to newest LTS version, OpenJDK 11. This seemed to make more sense than installing each specific version one at a time. At this point, tabcmd runs, but raises a different error.




      *** Uncaught exception NoClassDefFoundError: javax/xml/bind/JAXBException

      *** See the logs for the stacktrace.


    4) NOTE: At this point, to just test if there were additional undocumented dependencies for tabcmd that might be resolved by using a newer OS, I attempted installation on a freshly created Ubuntu 18.04 installation with the default JRE. Same results. Same failures. Continued working on Ubuntu 14.04 instance.


    5) Did a Google search for error above. This article indicates that JAXB are available in Java 7 and Java 8 SE but were removed from Java 9 SE forward. Note: I don't recommend trying the workarounds in the linked article. They only work if you are compiling an executable yourself.


    6) Decided to completely uninstall tabcmd, all versions and traces of Java and start over with Java 8.


    7) Installed OpenJDK 8 (apt-get install openjdk-8-jre) and tabcmd


    8) tabcmd login and test of a workbook export worked without error.