bd2kccd / r-causal

R Wrapper for Tetrad Library
35 stars 19 forks source link

Installation issue: Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : #102

Open shr264 opened 3 years ago

shr264 commented 3 years ago

I am trying to run the command

tetradrunner <- tetradrunner(algoId = 'fges',df = charity,scoreId = 'fisher-z',
                             dataType = 'continuous',alpha=0.1,faithfulnessAssumed=TRUE,maxDegree=-1,verbose=TRUE, 
                             priorKnowledge = prior)

after installing rcausal as directed here:

https://github.com/bd2kccd/r-causal

But I keep getting this error:

Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.IllegalAccessException: class RJavaTools cannot access a member of class java.util.Collections$UnmodifiableCollection (in module java.base) with modifiers "public"

I have also tried installing py-causal and that gave me errors too. Has anyone gotten these packages to work correctly on R or python?

kiattikunc commented 2 years ago

Same issue here, the rJAva library is not compatible with Java 1.8. I reverted to Java 1.6 and it works fine.

sieu-tran commented 2 years ago

@kiattikunc I reverted back to 1.6.0_45 but that created a new problem: Error in .jcall("edu/cmu/tetrad/annotation/AlgorithmAnnotations", "Ledu/cmu/tetrad/annotation/AlgorithmAnnotations;", : java.lang.UnsupportedClassVersionError: edu/cmu/tetrad/annotation/AlgorithmAnnotations : Unsupported major.minor version 52.0

This didnt come up in 1.8. Any ideas for solution?

kiattikunc commented 2 years ago

@sieu-tran My version of rJava is 1.0-6 , r-causal is 1.2.1 and the java runtime version is 13.0.1