Closed ozhyrenkov closed 3 years ago
Unfortunately errors in JDBC are entirely driver-specific, RJDBC only passes them through, so you are probably better off asking on the Presto mailing list. Also the driver doesn't seem to be very helpful "Error executing query" is a rather useless error to report. Since RJDBC 0.2-9 you can get the full exception object in case it provides any more useful details - a simple example using MariaDB:
> (r <- tryCatch(dbSendQuery(c, "SELECT * FROM foobar"), error=function(e) e))
<JDBC.result.error in dbSendQuery(c, "SELECT * FROM foobar"): Unable to retrieve JDBC result set
JDBC ERROR: (conn=8) Table 'test.foobar' doesn't exist
Statement: SELECT * FROM foobar>
> r$jex
[1] "Java-Object{java.sql.SQLSyntaxErrorException: (conn=8) Table 'test.foobar' doesn't exist}"
> r$jex$printStackTrace()
java.sql.SQLSyntaxErrorException: (conn=8) Table 'test.foobar' doesn't exist
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:62)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:153)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:274)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:363)
at org.mariadb.jdbc.MariaDbStatement.executeQuery(MariaDbStatement.java:612)
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Table 'test.foobar' doesn't exist
at org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(MariaDbSqlException.java:34)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(AbstractQueryProtocol.java:192)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:260)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:357)
... 1 more
Caused by: java.sql.SQLException: Table 'test.foobar' doesn't exist
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1681)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1543)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1506)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:254)
... 2 more
ok, thank you) So I'll go to presto team with full StackTrace. Let's close the issue, will post here updates in case I get anything out there.
I have a rocker-based docker container with rstudio and extra libs. There is an OpenJDK installed, rJava and RJDBC libs:
Here is
sessinoInfo()
I am trying to establish a connection to presto cluster:
It shows the error:
I tried to run the same from same network locally and it went successfully, the local machine system setup:
And the
sessionInfo()
:It feels problem is in Oracle vs OpenJDK java versions, however might be something else, as far as local machine in on macos. Could you please advise something to figure this out?