0

I'm having this issue for a while now and can't find answers online. I try to execute makeCluster and somehow get this

Error in .jfindClass(as.character(driverClass)[1]) : class not found

library(doParallel)
library(foreach)
cores = makeCluster(2)
# Loading required package: methods
# Loading required package: DBI
# Loading required package: rJava
# Error in .jfindClass(as.character(driverClass)[1]) : class not found
# Calls: JDBC -> is.jnull -> .jfindClass
# Execution halted

Would anyone be able to help? Thanks.

valuenaut
  • 303
  • 2
  • 4
  • 13
  • 1
    In my version of R, your 3-line script doesn't call neither `DBI` nor `rJava` packages. –  Feb 17 '16 at 08:28
  • 1
    Are you loading any packages from a .Rprofile script? And are you setting any environment variables in order to successfully load the rJava package? – Steve Weston Feb 17 '16 at 16:03
  • You got it, Steve. My .Rprofile had the line `library(RJDBC)` and the line `drv <- JDBC("com.sas.net.sharenet.ShareNetDriver", "/usr/local/sas/jdbc_driver/sas.intrnet.javatools.jar", identifier.quote="`")`. I had no idea this was there. I just removed it and now it works. Thanks a lot. – valuenaut Feb 18 '16 at 00:57

1 Answers1

0

In your console first File-->changedir into your jar file location

then you try this one

drv <- JDBC(driverClass="com.mysql.jdbc.Driver", classPath="mysql-connector-java-5.1.23-bin.jar", identifier.quote="`")

Chandu D
  • 505
  • 3
  • 17