OHDSI Home | Forums | Wiki | Github

Database driver issue when installing Achilles

Hi,

I am following this wiki instruction page to run Achilles, and hitting a road block for the database driver:

Connecting using PostgreSQL driver
Error in rJava::.jcall(jdbcDriver, "Ljava/sql/Connection;", "connect",  : 
  org.postgresql.util.PSQLException: SCRAM authentication is not supported by this driver. You need JDK >= 8 and pgjdbc >= 42.2.0 (not ".jre" versions)
> 

here are the steps I used:

> install.packages("rJava")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.csiro.au/bin/macosx/contrib/4.0/rJava_0.9-13.tgz'
Content type 'application/x-gzip' length 756445 bytes (738 KB)
==================================================
downloaded 738 KB


The downloaded binary packages are in
	/var/folders/12/1fgjb20d31v4vj2xv20jfzvc0000gq/T//RtmpYUqcfb/downloaded_packages
> library(rJava)
> .jinit()
> s <- .jnew("java/lang/String", "Hello World!")
> .jcall(s,"I","length")
[1] 12
> 
> 
> if (!require("devtools")) install.packages("devtools")
Loading required package: devtools
Loading required package: usethis
> 
> devtools::install_github("OHDSI/Achilles")
Downloading GitHub repo OHDSI/Achilles@HEAD
Installing 3 packages: cpp11, hms, readr
trying URL 'https://cran.csiro.au/bin/macosx/contrib/4.0/cpp11_0.2.6.tgz'
Content type 'application/x-gzip' length 199157 bytes (194 KB)
==================================================
downloaded 194 KB

trying URL 'https://cran.csiro.au/bin/macosx/contrib/4.0/hms_1.0.0.tgz'
Content type 'application/x-gzip' length 97752 bytes (95 KB)
==================================================
downloaded 95 KB

trying URL 'https://cran.csiro.au/bin/macosx/contrib/4.0/readr_1.4.0.tgz'
Content type 'application/x-gzip' length 2450519 bytes (2.3 MB)
==================================================
downloaded 2.3 MB


The downloaded binary packages are in
	/var/folders/12/1fgjb20d31v4vj2xv20jfzvc0000gq/T//RtmpYUqcfb/downloaded_packages
   checking for file ‘/private/var/folders/12/1fgjb20d31v4vj2xv20jfzvc0000gq/T/RtmpYUqcfb/remotesdc7b222b17/OHDSI-Achilles-77cde12/DESCRIPTION’ ...
* installing *source* package ‘Achilles’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   ‘RunningAchilles.Rmd’ using ‘UTF-8’ 
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Achilles)
> 
> 
> connectionDetails <- createConnectionDetails(
    dbms="postgresql", 
    server="localhost/synpuf_CDM", 
    user="xxxxx", 
    password="xxxxx", 
    port="5432")
> achilles(connectionDetails, 
   cdmDatabaseSchema = "cdm", 
   resultsDatabaseSchema="results",
   vocabDatabaseSchema = "cmd",
   numThreads = 1,
   sourceName = "synpuf_CDM", 
   cdmVersion = "5.2.2",
   runHeel = TRUE,
   runCostAnalysis = TRUE)
Connecting using PostgreSQL driver
Error in rJava::.jcall(jdbcDriver, "Ljava/sql/Connection;", "connect",  : 
  org.postgresql.util.PSQLException: **SCRAM authentication is not supported by this driver. You need JDK >= 8 and pgjdbc >= 42.2.0 (not ".jre" versions)**
> 

I am using Java 1.8 already, so the issue is on the pgjdbc driver… can someone tell me how to upgrade the driver to 42.2.0?

thanks!

All - I solved the problem by adding the latest postgresql driver to the Extensions directory of my java home. Thanks!

Hi @liyang
Do you mean adding the driver path in the environment variable? After the JAVA_HOME?

Thank you

t