Hi all,
I am working on getting set up to do development on DatabaseConnector, but I’ve run into an error with rJava. I have a Postgres database running and locally and have successfully connected to it, but receive a ClassNotFoundException when I try to execute a query. After inspecting the traceback and the error object itself, it appears the class rJava cannot find is org.ohdsi.databaseConnector.BatchedQuery, the one packaged as a JAR with the repository. It should be noted that I am working off of the “develop” branch of the DatabaseConnector repository after reading about the impending release of DatabaseConnector 2.0. Here are the contents of my RStudio session:
connectionDetails <- createConnectionDetails(dbms = “postgresql”, user = “trinetx”, password=“trinetx”, server = “localhost/trinetx”, schema = “trinetx”)
conn <- connect(connectionDetails)
Connecting using PostgreSQL driver
querySql(conn, “SELECT COUNT(*) FROM person”)
Error: Error executing SQL:
java.lang.ClassNotFoundException
An error report has been created at /Users/alex.lafreniere/work/sf/DatabaseConnector/errorReport.txt
And here is the error report:
DBMS:
postgresql
Error:
java.lang.ClassNotFoundException
SQL:
SELECT COUNT(*) FROM person
R version:
R version 3.4.1 (2017-06-30)
Platform:
x86_64-apple-darwin15.6.0
Attached base packages:
- stats
- graphics
- grDevices
- utils
- datasets
- methods
- base
Other attached packages:
- DatabaseConnector (2.0.0)
Any help would be greatly appreciated!