1

I am trying to create a RJDBC driver for crate. Whenever I ran

jdbcDriver <- JDBC(driverClass = 'io.crate.client.jdbc.CrateDriver', '../../private/tmp/crate-jdbc-standalone-1.0.4.jar')

I got:

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

I also tried:

jdbcDriver <- JDBC(driverClass = 'io.crate.client.jdbc.CrateDriver', '../../private/tmp/crate-jdbc-standalone-1.0.4.jar', identifier.quote = '´')

That's the working MySQL driver:

jdbcDriver <- JDBC(driverClass = 'com.mysql.jdbc.Driver', '../../private/tmp/mysql-connector-java-5.1.36-bin.jar', identifier.quote = '´')

Let me finally point out, that this code runs properly on another machine.

The fact, that the MySQL driver works as well as the crate driver on a colleagues' machine keeps baffling me. I checked the paths a dozens of times. I tried different version of the crate jdbc driver (from 1.0.4 to 1.9).

Question: Is there any other way to address the CrateDriver.class in a way that R won't pretend it could not find it? Or is it OS X which can't work with anything newer than Java SE6, and this is the source of evil? Help's appreciated. I am kind of desperate right now and waste/spend the whole day on it. -R

989
  • 12,579
  • 5
  • 31
  • 53
Robert Kirsten
  • 474
  • 2
  • 5
  • 12

2 Answers2

0

It seems that RStudio is pulling the Mac OS X supplied Java 1.6 Runtime and have problems then if you want to include the Crate JDBC driver. Crate requires at least JRE 1.7. Maybe you can define a different/custom JDK for running RStudio.

Regards, Michael

mfussenegger
  • 3,931
  • 23
  • 18
  • Thx, for helping Michael. But you've just reformulated my question as suggestion, haven't you? Actually, I am looking for a method to tell R which JDK to use. Do you know one? – Robert Kirsten Sep 21 '15 at 13:08
0

you can also define specific JAVA version for your script explicitly

Sys.setenv(JAVA_HOME='C:\\jdk7\\jre')