I’m trying to read dynamically a “table”/“frame” via a Java program.
The program return String with first row column names.
I was successful using R node integration and rJava
Below is a sample:
As within 3.6.1, R 341 and JDK 8.171 cannot execute with errors in rJava load (rJava.ddl on Windows nor rJava.so on Linux, none works).
So I’ve changed to a Java Script node,
The equivalent code is
String boxa = ca.g…SiebelUtilities.getRepositoryBC() ;
However I can’t use something like above
knime.out = boxa
in order to pass the dynamically the whole table further down to the workflow
a) I can manipulate individually some columns and return as collections, then process, but is not general (not dynamic)
Sample with only two columns
Comparison of output
b) I try to write to an intermediate file (or database), but still not dynamic at the read time
Any idea ?
Before going for the workaround, let us investigate on why your initial solution using rJava does not work anymore. What are the error messages you get? And for which versions it worked before?
I would like to thank you first for your interest.
Based on your request, I was able to push and debug why was no longer working.
And I’ve succeeded make-it working again on Windows only, in the following combinations
a) Knime 3.6.1 / R 3.4.1
From within the workflow, the Java_home and R version
How knime is start (note that PATH has been overwritten, as it was included a path to a java 32 bits which caused errors !
Details of execution (with success table…)
b) Also, works with Knime 3.4.2 and R 3.3.0
c) However, it doesn’t work on Linux !
Knime 3.6.0, R 3.5.1
d) Also note that from Linux and pure R, the library is loaded correctly
Thanks to your detailed description I was able to reproduce the issue. The steps from this discussion helped me to get it running:
- Find your R location. It will be stored in
rserver.conf file. Or just by doing
which R . The location usually is
- Find the
libjvm.so file which is usually in the
usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server path depending on which jre you’re using. Check
echo $JAVA_HOME .
- Create a symlink using
sudo ln -s /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so /usr/lib64/microsoft-r/3.3/lib64/R/lib/libjvm.so
Does that help?
We are getting there …
Following your suggestion, now the library rJava loads !
sudo ln -s /spss/InstallSoftware/ibm-java-x86_64-80/jre/lib/amd64/classic/libjvm.so /opt/microsoft/ropen/3.5.1/lib64/R/lib/libjvm.so
However the execution fails at jinit phase
From the knime.log, the associate message is the following
At the console, the error is as follows:
Note that from R perspective (and Rserve ?) “regular” nodes execute successfully in Knime (Linux); below a screen shot which is OK
On a final note, I did try executing knime as sudo
sudo ./knime &
with the same results as a “regular” user
Even though your Rserve seems to work properly (as some R nodes execute successfully), you might want to check the version of your Rserve package and in case it is below 1.8-6, try installing it via install.packages(‘Rserve’,“http://rforge.net/",type="source”) like it is suggested in another thread.
Finally I was able to install the latest version of Rserve, a.k.a. 1.8.6
Note that it needed openssl-devel in order to install (the previous version used, 1.7.3 didn’t needed !)
The latest test result is as follows: