Error in .jfindClass(as.character(driverClass)[1])

2019-03-04 19:02发布

问题:

> cassdrv <- JDBC("org.apache.cassandra.cql.jdbc.CassandraDriver",
+                 list.files("C://Users//VRavimurugan.GSIN//AppData//Roaming//RazorSQL//cassandra",pattern="jar$",full.names=T))

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

Tried this , but no luck RJDBC Cassandra -> Error in .jfindClass(as.character(driverClass)[1]) : class not found

回答1:

Just to note, the answer you linked to says to change the driver name to be

"com.datastax.driver.jdbc.CassandraDriver"

if you are using the dependencies listed in that answer, as opposed to the older dependencies listed here.



回答2:

As highlighted in this apparently related issue, a solution may be to remove the package, restart, and install it again.

In your case:

  1. Restart R
  2. In a clean session run the following command: remove.packages("RJDBC")
  3. Restart R again
  4. Re-install again the package with install.packages("RJDBC")

This should fix it. A similar procedure should work for other packages giving the same error message.