Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-17038

JNI plugin libraries aren't loaded due to relative java.library.path

    XMLWordPrintable

    Details

    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Steps to Reproduce:
      Hide

      Copy libjavamcsapi.so to PDI's java.library.path (./libswt/linux/xxx/)
      Copy kettle-columnstore-bulk-exporter-plugin to PDI's plugins directory (./plugins)
      Start PDI through "./spoon.sh"
      Open sample-transformation.ktr and run it.

      Files can be downloaded from: https://drive.google.com/file/d/1xjhZZVbuqDI6tFxqd_xK_N-JDFTa3_Jr/view?usp=sharing

      Show
      Copy libjavamcsapi.so to PDI's java.library.path (./libswt/linux/xxx/) Copy kettle-columnstore-bulk-exporter-plugin to PDI's plugins directory (./plugins) Start PDI through "./spoon.sh" Open sample-transformation.ktr and run it. Files can be downloaded from: https://drive.google.com/file/d/1xjhZZVbuqDI6tFxqd_xK_N-JDFTa3_Jr/view?usp=sharing

      Description

      I'm writing a plugin to support bulk loadings into MariaDB's ColumnStore database using ColumnStore's bulk write API. The API is written in C++ and uses Swig to provide a Java interface. Swig internally uses JNI to invoke the C++ functions from Java.

      To run the plugin it is required to have the compiled C++ library libjavamcsapi.so in the java.library.path. This is by default ../libswt/linux/x86_64 in my case.

      Unfortunately, the plugin still throws an java.library.path not found exception and stopped PDI.

      Once I changed the java.library.path in spoon.sh to the absolute path, it worked. Could you change that in the next release to the absolute path, so that our customers won't have to change spoon.sh by themselves?

      The current setup still requires to copy libjavamcsapi.so manually to the correct java.library.path. Is there a way automatically deploy libjavamcsapi.so to the correct java.library.path, similar to deploying additional plugin libraries?

        Attachments

        1. reproduce.zip
          178 kB
        2. spoon.zip
          6 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jens.rowekamp Jens Röwekamp
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: