OHDSI Home | Forums | Wiki | Github

Java version issue in running Patient-Level-Prediction packages

Dear all,

After I updated the versions of my R packages, I got an error about the Java version.

Error: Error executing SQL:

java.lang.UnsupportedClassVersionError: org/ohdsi/databaseConnector/BatchedQuery : Unsupported major.minor version 52.0

Did anyone experience the same issues? Your help will be much appreciated.
Thanks!
William

Dear William,
I am experiencing the same problem:

“Error executing SQL:
java.lang.UnsupportedClassVersionError: org/ohdsi/databaseConnector/BatchedQuery : Unsupported major.minor version 52.0”

No solution…

Julie

Hi Julwa,
Cannot be only two of us. I believe many others will be experiencing the same issue, after updating the Rstudio packages.
Hope it can be solved soon.
William

Sounds like the new package is compiled with Java8, and you may be running with 7 or older. Can you verify what you are running? From a command line “java -version” would tell you.

Stackoverflow post

-Chris

Hi Chris,

This is my java.
java version “1.7.0_231”

I also tried java/1.8.0u211. The error is still there.

This message typically indicates you’re running 64-bit R and 32-bit Java. Can you try and make sure these match, as explained here?

Hi Schuemie,
I think I already have 64-bit JAVA.

Java version “1.8.0_211”
Java™ SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot™ 64-Bit Server VM (build 25.211-b12, mixed mode)

Yes, that is 64-bits Java.

In that case, are you sure you’re running 64-bits R?

Another thing to check is whether R is really connecting to that Java version. You can run this code in R to find out:

library(rJava)
.jinit()
.jcall("java/lang/System", "S", "getProperty", "java.runtime.version")

Hi Schuemie,
I think I fixed the java version issue with your help.
However, I got the original problem back. I updated the versions of my R packages because my Lasso Logistic Regression model stopped with “Training Lasso Logistic Regression model”, meaning the plplog.txt ended with “Training Lasso Logistic Regression model” and there is no result folder created. I was told the problem was caused by outdated R packages.
Maybe I should create a new thread, but I just put it here since it is correlated.
Thanks!

t