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

Installation failure; Error occurred during initialization of VM; java/lang/NoClassDefFoundError: java/lang/Object #186

Open
tedmoorman opened this issue Dec 16, 2021 · 2 comments

Comments

@tedmoorman
Copy link

I'm receiving an error during the installation:

$ R CMD INSTALL ~/xlsx
* installing to library ‘/projects/CI_Analysts/R/x86_64-pc-linux-gnu-library/3.5’
* installing *source* package ‘xlsx’ ...
** package ‘xlsx’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
ERROR: loading failed

I have rJava and xlsxjars installed. I also ran tar fxz ~/xlsx_0.6.5.tar.gz and R CMD javareconf -e before running the install, which fixes most Java installation related problems. Here is my sessionInfo():

R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux

Matrix products: default
BLAS: /opt/R/R-3.5.3/lib64/R/lib/libRblas.so
LAPACK: /opt/R/R-3.5.3/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3    renv_0.14.0 

Any help is appreciated.

@colearendt
Copy link
Owner

colearendt commented Jan 29, 2022

Thanks for reporting this! This sounds like an rJava issue more than xlsx since java/lang/Object is a very core Java class.

Would you mind starting a fresh R session, and trying:

library(rJava)
.jinit()

This can help isolate rJava as the issue. xlsx runs .jinit() when you load the package, which initializes the Java VM. As such, we tend to highlight issues in the underlying JVM 🙈 The issue is probably outside of this package, I would guess

@tedmoorman
Copy link
Author

Ended up crashing RStudio! Output from running that code in the Terminal is below.

> library(rJava)
> .jinit()
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

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

No branches or pull requests

2 participants