I have my shinyapp deployed on Shiny Server. I use RJDBC::JDBC()
method to connect to Redshift DB.
RedshiftJDBC42-1.2.1.1001.jar file is in the folder called "driver" which is in the same folder as app.R file, the argument 'driverClass' is "com.amazon.redshift.jdbc42.Driver" and 'classPath' argument I provide is ".../driver/RedshiftJDBC42-1.2.1.1001.jar" but when I want to run the app in my browser, I get the following message (in browser):
An error has occurred
The application failed to start.
The application exited during initialization.
In the log I find the following:
Error in .jfindClass(as.character(driverClass)[1]) : class not found Calls: runApp ... ..stacktraceon.. -> JDBC -> is.jnull -> .jfindClass
I tried to set the CLASSPATH ('...' classified folders ):
export CLASSPATH="/home/.../driver/RedshiftJDBC42-1.2.1.1001.jar"
but this does not work.
Please help.