KNIME R integration (with rJava) problem

Hello,

 

I am trying to solve a problem with our KNIME workflow since few weeks without much success. We are using KNIME 2.11.3 with a workflow that uses R snippet to produce some ggplot2 graphs. While everything works great on our local machines, it doesn't work on our cluster.

When I submit a job via qsub, KNIME gets executed from a local directory and everything goes well. Then when it hits the R snippet node it exits saying:

 

WARN      KNIME-Worker-0 RController     Could not load jri library from 'XXX/R-3.2.5/library/rJava/jri/libjri.so': XXX/R-3.2.5/library/rJava/jri/libjri.so: libR.so: cannot open shared object file: No such file or directory
ERROR     KNIME-Worker-0 RController     Cannot load JRI native library
ERROR     KNIME-Worker-0 R Snippet     Execute failed: Cannot load jri library from any of following locations:
XXX/R-3.2.5/library/rJava/jri/libjri.so (load error: XXX/R-3.2.5/library/rJava/jri/libjri.so: libR.so: cannot open shared object file: No such file or directory)
XXX/R-3.2.5/library/rJava/jri/jri.so (not found)
Cannot load JRI native library

Now, R was installed with shared libraries enabled, got rJava installed and I did 'R CMD javareconf'. Everything went good and I can load rJava in R without a problem. How come this happens all the time?

I located the file libjri.so in the location where it was looked for, why does KNIME say it's not there? Plus the file jri.so is actually not where it's being looked for.  However, jri.so is also not present on my local machine in that folder, and that workflow works fine.

Any ideas? I've seen some topics with rJava being the culprit and people having similar problems ("Cannot load JRI native library"), but their solutions didn't help. Plus it does work flawlessly on my local machine. 

 

 

 

If you read the error message carefully, it's actually not complaining about libjri.so but about libR.so not being found. I guess the location of libR.so is not in the search path. What output do you get from "ldd -r XXX/R-3.2.5/library/rJava/jri/libjri.so"?