[R] RJDBC - Java connection to Oracle database crashing on execution

Justin Holder holderjustin at hotmail.co.uk
Fri Aug 19 13:01:22 CEST 2016


I have a script that starts with some code to open a connection to an Oracle database, however the code is crashing R/RStudio as soon as it runs. The code does run successfully on another machine.

The script opens by loading the required RJDBC package:

library("RJDBC", lib.loc="C:/Program Files/R/R-3.3.1/library")

After, this I run the code below that points to the required ojdbc7.jar file, that should start the connection, however this crashes R, closing it down a few seconds later:

drv = JDBC("oracle.jdbc.OracleDriver",
               classPath="C:/Program Files/R/ojdbc7.jar", " ")

The same thing happens in Rstudio - there is no error message, the program simply crashes stating that "R encountered a fatal error . The session was terminated".

Again, the code executes exactly as written on a another machine.I have the latest versions of all required software/packages, so I'm not sure what is causing the crash.


	[[alternative HTML version deleted]]

More information about the R-help mailing list