Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redshift Connection #8

Closed
smantha opened this issue Feb 12, 2015 · 4 comments
Closed

Redshift Connection #8

smantha opened this issue Feb 12, 2015 · 4 comments

Comments

@smantha
Copy link

smantha commented Feb 12, 2015

Unable to connect to make a connection to Redshift database. Java is installed on the server and also the JDBC driver. DatabaseConnector unable to make the connection.

library(Achilles)
Loading required package: SqlRender
Loading required package: DatabaseConnector
Loading required package: RJDBC
Loading required package: DBI
Loading required package: rJava
Loading required package: rjson
connectionDetails <- createConnectionDetails(dbms="redshift",server="10.999.999.99/omop",port="5439", schema="achilles",user="achilles",password="passwd" )
conn <- connect(connectionDetails)
Connecting using Redshift driver
Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], :
java.lang.NoClassDefFoundError: org.postgresql.jdbc4.Jdbc4Connection

.libPaths()
[1] "/usr/lib64/R/library" "/usr/share/R/library"

$ ls /usr/lib64/R/library/DatabaseConnector/java/
jtds-1.2.7.jar postgresql-8.4-704.jdbc4.jar
mysql-connector-java-5.1.30-bin.jar postgresql-9.3-1101.jdbc4.jar
ojdbc6.jar sqljdbc4.jar

@schuemie
Copy link
Member

I'm not able to reproduce this error (in the IMEDS lab). Might be due to an incompatible Java version. Which Java are you running? (OpenJDK? Oracle? Version 6,7,8?)

@smantha
Copy link
Author

smantha commented Feb 12, 2015

$ which java
/usr/bin/java

java --version
java version "1.5.0"
gij (GNU libgcj) version 4.4.7 20120313 (Red Hat 4.4.7-4)

@smantha
Copy link
Author

smantha commented Feb 13, 2015

Using Oracle Java version worked.

$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

@schuemie
Copy link
Member

I added a comment about this to the readme file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants