0

我尝试了这个相关问题中的所有建议,但仍然得到最后一个错误

library(rJava)
.jinit(force.init = T)
.jaddClassPath(dir('~/Dropbox/R_packages/JavaJS/',full.names = TRUE)))
mol.db <- "~/Downloads/SEPULVEDA_MOLECULAR.accdb"
jfile = .jnew('java/io/File',mol.db)
dbbo <- .jnew("com/healthmarketscience/jackcess/DatabaseBuilder")
dbbo <- .jcall(dbbo,"Lcom/healthmarketscience/jackcess/DatabaseBuilder;","setFile",jfile)
db <- .jcall(dbbo,"Lcom/healthmarketscience/jackcess/Database;","open",evalArray = FALSE,evalString = FALSE) # fails!!!!


Error in .jcall(dbbo, "Lcom/healthmarketscience/jackcess/Database;", "open", : 
  java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

这是 .jclassPath() 的结果

“/Users/JS/Dropbox/R_packages/library/rJava/java” “/Users/JS/Dropbox/R_packages/JavaJS/commons-codec-1.10” “/Users/JS/Dropbox/R_packages/JavaJS/commons-lang- 2.6" "/Users/JS/Dropbox/R_packages/JavaJS/commons-logging-1.1.3" "/Users/JS/Dropbox/R_packages/JavaJS/hsqldb-2.2.8.jar" "/Users/JS/Dropbox/ R_packages/JavaJS/jackcess-2.1.6.jar" "/Users/JS/Dropbox/R_packages/JavaJS/log4j-1.2.7.jar" "/Users/JS/Dropbox/R_packages/JavaJS/poi-3.9" "/用户/JS/Dropbox/R_packages/JavaJS/ucanaccess-3.0.7.jar"

会话信息()

R 版本 3.3.2 (2016-10-31) 平台:x86_64-apple-darwin13.4.0 (64-bit) 运行于:OS X El Capitan 10.11.6

语言环境: 1 en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

附加的基础包: 1 stats graphics grDevices utils datasets methods base

其他附加包: 1 rJava_0.9-8 tibble_1.2 datapasta_1.0.0 rlist_0.4.6.1 pipeR_0.6.1.3 janitor_0.2.1 data.table_1.10.0

通过命名空间加载(未附加): 1 magrittr_1.5 R6_2.2.0 assertthat_0.1 tools_3.3.2 DBI_0.5-1 dplyr_0.5.0 Rcpp_0.12.8

谢谢你的帮助!

4

0 回答 0