【问题标题】:Dbeaver Connecting to Hive - SQLException: Method not supportedDbeaver 连接到 Hive - SQLException:不支持方法
【发布时间】:2014-11-30 22:10:37
【问题描述】:
I'm getting this error when trying to run a select after connecting to Hive.

这是一个坏的 jar 文件吗?

org.jkiss.dbeaver.model.impl.jdbc.JDBCException: SQL Error: Method not supported
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:170)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:1)
at org.jkiss.dbeaver.model.DBUtils.createStatement(DBUtils.java:985)
at org.jkiss.dbeaver.model.DBUtils.prepareStatement(DBUtils.java:963)
at org.jkiss.dbeaver.runtime.sql.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:313)
at org.jkiss.dbeaver.runtime.sql.SQLQueryJob.extractData(SQLQueryJob.java:633)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsProvider.readData(SQLEditor.java:1169)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetDataPumpJob.run(ResultSetDataPumpJob.java:132)
at org.jkiss.dbeaver.runtime.AbstractJob.run(AbstractJob.java:91)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.sql.SQLException: Method not supported
at org.apache.hadoop.hive.jdbc.HiveConnection.createStatement(HiveConnection.java:229)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.createStatement(JDBCConnectionImpl.java:350)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:138)
... 9 more

【问题讨论】:

  • 我遇到了类似的问题。你有没有设法找到它的底部?另外,您使用的是什么驱动程序,您连接的是什么 Hive-Hadoop 发行版?

标签: hive dbeaver


【解决方案1】:

hive jdbc jar 中有一个名为 org.apache.hive.jdbc.HiveResultSetMetaData 的调用。此类包含一个 isWritable 方法,该方法尚不受 hive 支持。这就是您收到错误“方法不支持”的原因。

取这个类的源码,更新上面的方法。然后生成类并在jar中替换它。这对我有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-13
    • 1970-01-01
    • 2013-10-12
    • 2017-05-06
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    相关资源
    最近更新 更多