0

I tried all the suggestions in this related question and still get the last error

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

Here is the result of .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" "/Users/JS/Dropbox/R_packages/JavaJS/ucanaccess-3.0.7.jar"

sessionInfo()

R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X El Capitan 10.11.6

locale: 1 en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages: 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

loaded via a namespace (and not attached): 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

Thanks for any help!

Community
  • 1
  • 1
Jorge Sepulveda
  • 291
  • 2
  • 8
  • Did you notice the edit in the [other answer](http://stackoverflow.com/q/32053273/2144390) where they said "well I found the answer to this step, I just needed a semicolon (;) at the end of class definition string"? – Gord Thompson Feb 04 '17 at 14:14
  • @gord-thompson I did! Edited the question to include the code. – Jorge Sepulveda Feb 08 '17 at 16:54

0 Answers0