[英].jfindclass error on R Shiny Server
I have my shinyapp deployed on Shiny Server.我在 Shiny Server 上部署了我的 Shinyapp。 I use RJDBC::JDBC()
method to connect to Redshift DB.我使用RJDBC::JDBC()
方法连接到 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): RedshiftJDBC42-1.2.1.1001.jar 文件位于名为“driver”的文件夹中,该文件夹与 app.R 文件位于同一文件夹中,参数“driverClass”是“com.amazon.redshift.jdbc42.Driver”和“classPath”参数我提供的是“.../driver/RedshiftJDBC42-1.2.1.1001.jar”但是当我想在浏览器中运行该应用程序时,我收到以下消息(在浏览器中):
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 .jfindClass(as.character(driverClass)[1]) 中的错误:找不到类调用:runApp ... ..stacktraceon.. -> JDBC -> is.jnull -> .jfindClass
I tried to set the CLASSPATH ('...' classified folders ):我试图设置 CLASSPATH('...' 分类文件夹):
export CLASSPATH="/home/.../driver/RedshiftJDBC42-1.2.1.1001.jar" export CLASSPATH="/home/.../driver/RedshiftJDBC42-1.2.1.1001.jar"
but this does not work.但这不起作用。
Please help.请帮忙。
将驱动程序放在 /opt make 下,例如 /opt/driver/driver/RedshiftJDBC42-1.2.1.1001.jar 仔细检查路径...区分大小写
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.