Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7100

[C++] libjvm.so not found on ubuntu 19.04 with openjdk-11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.15.1
    • 0.16.0
    • C++
    • ubuntu 19.04

    Description

      On ubuntu 19.04, with java-11 installed, the following code raises an error

       

      $ python -c "import pyarrow as pa; pa.hdfs.connect()"
      Traceback (most recent call last):
      {{ File "<string>", line 1, in <module>}}
      {{ File "/home/amignon/Projets/Sandbox/bwl_negbin/venv/lib/python3.7/site-packages/pyarrow/hdfs.py", line 215, in connect}}
      {{ extra_conf=extra_conf)}}
      {{ File "/home/amignon/Projets/Sandbox/bwl_negbin/venv/lib/python3.7/site-packages/pyarrow/hdfs.py", line 40, in _init_}}
      {{ self._connect(host, port, user, kerb_ticket, driver, extra_conf)}}
      {{ File "pyarrow/io-hdfs.pxi", line 89, in pyarrow.lib.HadoopFileSystem._connect}}
      {{ File "pyarrow/error.pxi", line 80, in pyarrow.lib.check_status}}
      pyarrow.lib.ArrowIOError: Unable to load libjvm

       

      while it works with java-8 installed (even when JAVA_HOME points to java-11).

       

      This seems to be due to a change in the directory structure of java. In java-11, libjvm lies in

      /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so

      Instead of

      /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so

       

      According to the code of hdfs_internal.cc the search suffixes on linux are:

       

        "/jre/lib/amd64/server", "/lib/amd64/server"

      which would explain the problem.

      This is confirmed by adding manually a amd64/server in the java-11 directory.

       

       

      Attachments

        Issue Links

          Activity

            People

              amignon Alexis Mignon
              amignon Alexis Mignon
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h