Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kingfish777 opened this issue Apr 12, 2017 · 4 comments
Open

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

kingfish777 opened this issue Apr 12, 2017 · 4 comments

Comments

@kingfish777
Copy link

kingfish777 commented Apr 12, 2017

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
Copy link
Author

kingfish777 commented Apr 13, 2017

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

  • Tried update-alternatives route with oracle java 7/8 and openjdk 7/8, jdk 9ea.
  • Tried removing all R packages (including bioconductor), doing apt autoremove and re-installing R afresh
  • Tried setting up local r-causal-master, importing fresh tetrad-cmd-lib from 6.01 snapshot (the latest snapshot to which I have access)
  • And the usual R fixes:
    -- recompiled all packages
    -- R CMD javareconf
    -- messed with environment variables (LD_PATH_LIBRARY), Sys.setenv(LD_...
    -- sudo ldconfig, etc.

HELP!!!

@kingfish777
Copy link
Author

Resolved with fresh Ubuntu installation. Whew!

@kingfish777
Copy link
Author

kingfish777 commented Apr 15, 2017

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’

@kingfish777 kingfish777 reopened this Apr 15, 2017
@amurrayw
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants