bd2kccd / r-causal

R Wrapper for Tetrad Library
35 stars 19 forks source link

Catastrophic error with r-causal javax.xml.documentbuilder #42

Open kingfish777 opened 7 years ago

kingfish777 commented 7 years ago

Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial

# note: this works, well, doesn't work, that is, it breaks with "real" (read: "truthy") data as well =>
> library(rcausal)
> a <- c(1,1,1,0,0,0)
> b <- c(1,1,1,1,0,0)
> c <- c(0,0,0,1,0,0)
> dat <- data.frame(a,b,c)
> fges.discrete(dat)
Datasets:
dat 

Error in .jnew("edu/cmu/tetrad/search/Fges", score) : 
  java.lang.NoClassDefFoundError: Could not initialize class edu.cmu.tetrad.util.TetradLogger
> pcmax(dat)
Error in .jnew("edu/cmu/tetrad/search/IndTestFisherZ", tetradData, significance) : 
  javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created

Seeing similar issue in Java API. Java versions: 9ea, 8u121, 8u111, 7, both oracle and openjdk. Not sure what has happened. 8/

kingfish777 commented 7 years ago

System: Ubuntu 16.04, bioconductor 3.3 The following attempts at fixing issue were made to no avail:

HELP!!!

kingfish777 commented 7 years ago

Resolved with fresh Ubuntu installation. Whew!

kingfish777 commented 7 years ago

potential bioconductor 3.4 incompatibility (rJava) With this version, rcausal failed:

> f <- fges.discrete(dat)
node_names:  a 
value: [1] 0 1

node_names:  b 
value: [1] 0 1

node_names:  c 
value: [1] 0 1

node_names:  d 
value: [1] 0 1

Datasets:
dat 
Error in .jnew("edu/cmu/tetrad/search/Fges", score) : 
  java.lang.NoClassDefFoundError: Could not initialize class edu.cmu.tetrad.util.TetradLogger

> biocVersion()
[1] ‘3.4’

However, it works fine with older bioc:


> biocVersion()
[1] ‘3.2’
amurrayw commented 7 years ago

I reproduced the bug in a fresh install of Linux Mint 18.1 Serena (based on Ubuntu Xenial), R version 3.4.0, biocVersion 3.5

Both of the first two examples posted in the README file (continuous and discrete runs of fges) fail with:

Error in .jnew("edu/cmu/tetrad/search/Fges", score) : java.lang.NoClassDefFoundError: Could not initialize class edu.cmu.tetrad.util.TetradLogger

Traceback output (for fges.discrete) is:

4: stop(list(message = "java.lang.NoClassDefFoundError: Could not initialize class edu.cmu.tetrad.util.TetradLogger", call = .jnew("edu/cmu/tetrad/search/Fges", score), jobj = <S4 object of class "jobjRef">)) 3: .External(RcreateObject, class, ..., silent = silent) 2: .jnew("edu/cmu/tetrad/search/Fges", score) 1: fges.discrete(df = audiology, structurePrior = 1, samplePrior = 1, maxDegree = -1, faithfulnessAssumed = TRUE, numOfThreads = 2, verbose = TRUE)