Re: [sql-workbench] Connect to hive through JDBC

2,380 views
Skip to first unread message

Thomas Kellerer

unread,
May 21, 2013, 2:17:59 PM5/21/13
to sql-wo...@googlegroups.com
Please send me the full logfile so I can find out which method exactly causes the error.
(you can send the logfile to the support address if you don't want to post it on a public group)

Regards
Thomas


Markus wrote on 21.05.2013 20:14:
> Hi all,
>
> I first want to congratulate to your amazing software.
>
> I am currently trying to connect workbench/J to hadoop hive. After adding a bunch of jars to the I succeeded in connect to the database and both 'show tables' and 'describe my_table' return successfully. Unfortunately trying to run a select statement terminates with "Method not supported".
>
> Based on the JDBC doc it seems that this is an error message from the JDBC driver when one of the unsupported methods is called:
> http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-1.2.0/ds_Hive/jdbc-hs2.html
>
> Is there a way to get the hive JDBC driver to run?
>
> Markus
>

Markus

unread,
May 21, 2013, 2:22:47 PM5/21/13
to sql-wo...@googlegroups.com
Where can I find the log file? On the GUI "Method not found" is the only information I can find.

Markus

unread,
May 21, 2013, 5:24:17 PM5/21/13
to sql-wo...@googlegroups.com
I found it:

2013-05-21 11:35 INFO  =================== Log started ===================
2013-05-21 11:35 INFO  Using configdir: /Users/Markus/.sqlworkbench
2013-05-21 11:35 WARN  Removing hidden attribute of the configuration directory!
2013-05-21 11:35 WARN  Removing hidden attribute of the configuration directory!
2013-05-21 11:35 INFO  Starting SQL Workbench/J, Build 114 (2013-01-21 19:41)
2013-05-21 11:35 INFO  Java version=1.6.0_37, java.home=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home, vendor=Apple Inc., name=Java HotSpot(TM) 64-Bit Server VM
2013-05-21 11:35 INFO  Operating System=Mac OS X, version=10.8.2, platform=x86_64
2013-05-21 11:35 INFO  Mac OS ApplicationListener installed
2013-05-21 11:35 INFO  Ignoring unknown event: handleOpenApplication
2013-05-21 11:35 INFO  Creating new connection for [{Default group}/Hive] for driver=org.apache.hadoop.hive.jdbc.HiveDriver
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/commons-logging-1.1.1.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/hadoop-core-1.0.3.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/hive-exec-0.8.1.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/hive-jdbc-0.8.1.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/hive-metastore-0.8.1.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/hive-service-0.8.1.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/libfb303-0.7.0.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/libthrift-0.7.0.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/log4j-1.2.15.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/slf4j-api-1.6.1.jar
2013-05-21 11:35 INFO  Adding ClassLoader URL=file:/Users/Markus/Documents/JDBC/hive_jdbc-0.8.1/slf4j-log4j12-1.6.1.jar
2013-05-21 11:35 INFO  Driver (org.apache.hadoop.hive.jdbc.HiveDriver) does not support the autocommit property: Method not supported
2013-05-21 11:35 INFO  Using DBID=hive
2013-05-21 11:35 ERROR Error when retrieving identifier quote character Method not supported
java.sql.SQLException: Method not supported
    at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData.getIdentifierQuoteString(HiveDatabaseMetaData.java:356)
    at workbench.db.DbMetadata.<init>(DbMetadata.java:332)
    at workbench.db.WbConnection.setSqlConnection(WbConnection.java:452)
    at workbench.db.WbConnection.<init>(WbConnection.java:113)
    at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:232)
    at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:145)
    at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:215)
    at workbench.gui.components.ConnectionSelector$2.run(ConnectionSelector.java:133)

2013-05-21 11:35 INFO  Using quote escape character: "
2013-05-21 11:35 INFO  Using search string escape character: \
2013-05-21 11:35 INFO  Connected to: [Hive], Database version: [1], Driver version: [0.8.1], JDBC Version: [3.0], ID: [WbWin-1]
2013-05-21 11:35 WARN  Error retrieving DB version (Method not supported)
2013-05-21 11:35 ERROR Error executing:
SELECT *
FROM tmp_roambi_week
LIMIT 10
  Method not supported
2013-05-21 11:35 INFO  Disconnecting: [Hive], ID=WbWin-1
2013-05-21 11:35 INFO  Stopping SQL Workbench/J, Build 114
2013-05-21 11:35 INFO  =================== Log stopped ===================

On Tuesday, May 21, 2013 11:17:59 AM UTC-7, Thomas Kellerer wrote:

Thomas Kellerer

unread,
May 21, 2013, 5:31:16 PM5/21/13
to sql-wo...@googlegroups.com
Hmm, nothing much in there.

Can you please change the log level to DEBUG (Tools -> Options -> General) and try again?

Regards
Thomas

Thomas Kellerer

unread,
May 30, 2013, 9:41:06 AM5/30/13
to sql-wo...@googlegroups.com
Please change the configuration by using this command:

WbSetConfig workbench.db.hive.extended.createstmt=false

That should workaround this bug in the JDBC driver

Regards
Thomas


Ryan wrote on 30.05.2013 15:37:
> First, thanks for the work done on this tool. It is by far my favorite for accessing databases via JDBC.
>
> I also run into this issue when accessing a Hive source. Here is a debug log of a simple query:
>
> 2013-05-30 09:17 INFO =================== Log started ===================
> 2013-05-30 09:17 INFO Using configdir: C:\apps\Workbench\.sqlworkbench
> 2013-05-30 09:17 INFO Starting SQL Workbench/J, Build 114 (2013-01-21 19:41)
> 2013-05-30 09:17 INFO Java version=1.6.0_45, java.home=C:\Program Files\Java\jre6, vendor=Sun Microsystems Inc., name=Java HotSpot(TM) Client VM
> 2013-05-30 09:17 INFO Operating System=Windows XP, version=5.1, platform=x86
> 2013-05-30 09:19 INFO Creating new connection for [{bds}/__hive] for driver=org.apache.hive.jdbc.HiveDriver
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/commons-logging-1.0.4.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-cli-0.12.0-SNAPSHOT.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-jdbc-0.12.0-SNAPSHOT.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-service-0.12.0-SNAPSHOT.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-shims-0.12.0-SNAPSHOT.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/libthrift-0.9.0.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/log4j-1.2.16.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/slf4j-api-1.6.1.jar
> 2013-05-30 09:19 INFO Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/slf4j-log4j12-1.6.1.jar
> 2013-05-30 09:19 INFO Using DBID=hive
> 2013-05-30 09:19 DEBUG Re-Use statement: false, cache current schema: false, SQL: null
> 2013-05-30 09:19 ERROR Error when retrieving identifier quote character Method not supported
> java.sql.SQLException: Method not supported
> at org.apache.hive.jdbc.HiveDatabaseMetaData.getIdentifierQuoteString(HiveDatabaseMetaData.java:315)
> at workbench.db.DbMetadata.<init>(DbMetadata.java:332)
> at workbench.db.WbConnection.setSqlConnection(WbConnection.java:452)
> at workbench.db.WbConnection.<init>(WbConnection.java:113)
> at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:232)
> at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:145)
> at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:215)
> at workbench.gui.components.ConnectionSelector$2.run(ConnectionSelector.java:133)
>
> 2013-05-30 09:19 INFO Using quote escape character: "
> 2013-05-30 09:19 INFO Using search string escape character: \
> 2013-05-30 09:19 DEBUG Using table types returned by the JDBC driver: [EXTERNAL_TABLE, MANAGED_TABLE]
> 2013-05-30 09:19 DEBUG Using catalog separator: [.]
> 2013-05-30 09:19 INFO Connected to: [Hive], Database version: [0.10.0], Driver version: [0.12.0-SNAPSHOT], JDBC Version: [3.0], ID: [Wb1-1]
> 2013-05-30 09:19 WARN Error retrieving DB version (Method not supported)
> 2013-05-30 09:19 ERROR Error executing:
> select day_id from default.fiscal_calendar limit 10
> Method not supported
> java.sql.SQLException: Method not supported
> at org.apache.hive.jdbc.HiveConnection.createStatement(HiveConnection.java:309)
> at workbench.db.WbConnection.createStatementForQuery(WbConnection.java:855)
> at workbench.sql.commands.SelectCommand.execute(SelectCommand.java:85)
> at workbench.sql.StatementRunner.runStatement(StatementRunner.java:419)
> at workbench.gui.sql.SqlPanel.displayResult(SqlPanel.java:3024)
> at workbench.gui.sql.SqlPanel.runStatement(SqlPanel.java:1983)
> at workbench.gui.sql.SqlPanel$13.run(SqlPanel.java:1940)
>
> 2013-05-30 09:19 DEBUG SQL execution finished
> 2013-05-30 09:19 INFO Disconnecting: [__hive], ID=Wb1-1
> --
> You received this message because you are subscribed to the Google Groups "SQL Workbench/J - DBMS independent SQL tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sql-workbenc...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Ryan

unread,
May 30, 2013, 9:46:33 AM5/30/13
to sql-wo...@googlegroups.com
That did the trick.  Thanks for the workaround.

Ryan

unread,
Aug 26, 2013, 10:33:22 PM8/26/13
to sql-wo...@googlegroups.com
I came across another query ("refresh" in this case) that causes a method not supported error.  This error is triggered by the getMoreResults() call as shown below in the log posting.  I saw the available setting workbench.db.oracle_lite_ordbms.dml.supports.results=false and tried to apply that with workbench.hive.dml.supports.results=false to no avail.  Any chance there is a workaround for this one as well?

2013-08-26 22:23 INFO   =================== Log started =================== 
2013-08-26 22:23 INFO  Settings.initialize() Using configdir: C:\apps\Workbench\.sqlworkbench 
2013-08-26 22:23 DEBUG Settings.initialize() Last modification time of loaded config file: 1377570190918 
2013-08-26 22:23 INFO  WbManager.init() Starting SQL Workbench/J, Build 114 (2013-01-21 19:41) 
2013-08-26 22:23 INFO  WbManager.init() Java version=1.6.0_45, java.home=C:\Program Files\Java\jre6, vendor=Sun Microsystems Inc., name=Java HotSpot(TM) 64-Bit Server VM 
2013-08-26 22:23 INFO  WbManager.init() Operating System=Windows 7, version=6.1, platform=amd64 
2013-08-26 22:23 DEBUG MacroManager.loadMacros() Macro file C:\apps\Workbench\.sqlworkbench\WbMacros.xml not found. No Macros loaded 
2013-08-26 22:23 DEBUG WbDesCipher.getInstance() WbDesCipher created 
2013-08-26 22:23 INFO  ConnectionMgr.getConnection() Creating new connection for [{bds}/_impala_snapshot] for driver=org.apache.hive.jdbc.HiveDriver 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/commons-logging-1.0.4.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/hive-cli-0.12.0-SNAPSHOT.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/hive-jdbc-0.12.0-SNAPSHOT.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/hive-service-0.12.0-SNAPSHOT.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/hive-shims-0.12.0-SNAPSHOT.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/libthrift-0.9.0.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/log4j-1.2.16.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/slf4j-api-1.6.1.jar 
2013-08-26 22:23 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/_testhive/slf4j-log4j12-1.6.1.jar 
2013-08-26 22:23 INFO  ConnectionMgr.connect() Driver (org.apache.hive.jdbc.HiveDriver) does not support the autocommit property: enabling autocommit is not supported 
2013-08-26 22:23 INFO  DbMetadata.<init> Using DBID=hive 
2013-08-26 22:23 DEBUG GenericSchemaInfoReader.logSettings() Re-Use statement: false, cache current schema: false, SQL: null 
2013-08-26 22:23 ERROR DbMetadata.<init> Error when retrieving identifier quote character Method not supported
java.sql.SQLException: Method not supported
at org.apache.hive.jdbc.HiveDatabaseMetaData.getIdentifierQuoteString(HiveDatabaseMetaData.java:338)
at workbench.db.DbMetadata.<init>(DbMetadata.java:332)
at workbench.db.WbConnection.setSqlConnection(WbConnection.java:452)
at workbench.db.WbConnection.<init>(WbConnection.java:113)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:232)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:145)
at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:215)
at workbench.gui.components.ConnectionSelector$2.run(ConnectionSelector.java:133)

2013-08-26 22:23 INFO  DbMetadata.<init> Using quote escape character: " 
2013-08-26 22:23 INFO  DbMetadata.<init> Using search string escape character: \ 
2013-08-26 22:23 DEBUG DbMetadata.<init> Using table types returned by the JDBC driver: [TABLE] 
2013-08-26 22:23 DEBUG DbMetadata.<init> Using catalog separator: [.] 
2013-08-26 22:23 INFO  ConnectionMgr.getConnection() Connected to: [Hive], Database version: [1.1], Driver version: [0.12.0-SNAPSHOT], JDBC Version: [3.0], ID: [Wb1-3] 
2013-08-26 22:23 WARN  WbConnection.getDatabaseVersion() Error retrieving DB version (Method not supported) 
2013-08-26 22:23 ERROR SqlCommand.processResults() Error when calling getMoreResults() Method not supported
java.sql.SQLException: Method not supported
at org.apache.hive.jdbc.HiveStatement.getMoreResults(HiveStatement.java:365)
at workbench.sql.SqlCommand.processResults(SqlCommand.java:496)
at workbench.sql.SqlCommand.processResults(SqlCommand.java:441)
at workbench.sql.SqlCommand.execute(SqlCommand.java:395)
at workbench.sql.StatementRunner.runStatement(StatementRunner.java:419)
at workbench.gui.sql.SqlPanel.displayResult(SqlPanel.java:3024)
at workbench.gui.sql.SqlPanel.runStatement(SqlPanel.java:1983)
at workbench.gui.sql.SqlPanel$13.run(SqlPanel.java:1940)

2013-08-26 22:23 ERROR SqlCommand.processResults() Error when calling getMoreResults() Method not supported
java.sql.SQLException: Method not supported
at org.apache.hive.jdbc.HiveStatement.getMoreResults(HiveStatement.java:365)
at workbench.sql.SqlCommand.processResults(SqlCommand.java:627)
at workbench.sql.SqlCommand.processResults(SqlCommand.java:441)
at workbench.sql.SqlCommand.execute(SqlCommand.java:395)
at workbench.sql.StatementRunner.runStatement(StatementRunner.java:419)
at workbench.gui.sql.SqlPanel.displayResult(SqlPanel.java:3024)
at workbench.gui.sql.SqlPanel.runStatement(SqlPanel.java:1983)
at workbench.gui.sql.SqlPanel$13.run(SqlPanel.java:1940)

2013-08-26 22:23 DEBUG StatementRunner.done() SQL execution finished 
2013-08-26 22:23 DEBUG ConnectionMgr.disconnect() Trying to physically close the connection with id=Wb1-3 
2013-08-26 22:23 INFO  ConnectionMgr.disconnect() Disconnecting: [_impala_snapshot], ID=Wb1-3 
2013-08-26 22:23 DEBUG WbConnection.close() Connection Wb1-3 closed. 
2013-08-26 22:23 DEBUG WbManager.closeAllWindows() Closing all open windows 
2013-08-26 22:23 DEBUG Settings.saveSettings() Global settings saved to: C:\apps\Workbench\.sqlworkbench\workbench.settings 
2013-08-26 22:23 INFO  WbManager.doShutdown() Stopping SQL Workbench/J, Build 114 
2013-08-26 22:23 INFO   =================== Log stopped =================== 

Thomas Kellerer

unread,
Aug 27, 2013, 4:10:34 AM8/27/13
to sql-wo...@googlegroups.com
Hi,

> I came across another query ("refresh" in this case) that causes a /method not supported/ error.
> This error is triggered by the /getMoreResults()/ call as shown below in the log posting.
> I saw the available setting /workbench.db.oracle_lite_ordbms.dml.supports.results=false/ and tried to apply that
> with /workbench.hive.dml.supports.results=false/ to no avail. Any chance there is a workaround for this one as well?

Currently there is no workaround to avoid this.

But this should not prevent the statement from running successfully.
It is only a warning. The first result set (if any) should still be processed correctly.


Regards
Thomas

Ryan

unread,
Aug 27, 2013, 8:32:51 AM8/27/13
to sql-wo...@googlegroups.com
Of course you are correct.  I ran a failed test case to see if the statement worked despite the message, but it turns out that test case was flawed.  Thanks for the clarification.

Ryan

unread,
Sep 27, 2013, 12:27:58 PM9/27/13
to sql-wo...@googlegroups.com
I just installed the latest stable build and the "method not supported" error is thrown on statements that worked without issue in the previous release.  Something as simple as drop table if exists default.bob fails to run now.  That is the statement I ran to generate this log:

2013-09-27 12:16 INFO   =================== Log started =================== 
2013-09-27 12:16 INFO  Settings.initialize() Using configdir: C:\apps\Workbench\.sqlworkbench 
2013-09-27 12:16 DEBUG Settings.initialize() Last modification time of loaded config file: 1380298580825 
2013-09-27 12:16 INFO  ResourceMgr.getResources() Setting default locale to: en 
2013-09-27 12:16 INFO  WbManager.init() Starting SQL Workbench/J, Build 115 (2013-09-01 11:26) 
2013-09-27 12:16 INFO  WbManager.init() Java version=1.6.0_45, java.home=C:\Program Files\Java\jre6, vendor=Sun Microsystems Inc., name=Java HotSpot(TM) 64-Bit Server VM 
2013-09-27 12:16 INFO  WbManager.init() Operating System=Windows 7, version=6.1, platform=amd64 
2013-09-27 12:16 DEBUG MacroManager.loadMacros() Macro file C:\apps\Workbench\.sqlworkbench\WbMacros.xml not found. No Macros loaded 
2013-09-27 12:16 INFO  WbManager.runGui() Starting DeadlockMonitor 
2013-09-27 12:16 DEBUG WbDesCipher.getInstance() WbDesCipher created 
2013-09-27 12:16 INFO  ConnectionMgr.getConnection() Creating new connection for [{bds}/hive] for driver=org.apache.hive.jdbc.HiveDriver 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/commons-logging-1.0.4.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-cli-0.12.0-SNAPSHOT.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-jdbc-0.12.0-SNAPSHOT.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-service-0.12.0-SNAPSHOT.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/hive-shims-0.12.0-SNAPSHOT.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/libthrift-0.9.0.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/log4j-1.2.16.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/slf4j-api-1.6.1.jar 
2013-09-27 12:16 INFO  DbDriver.loadDriverClass() Adding ClassLoader URL=file:/C:/stuff/jdbc%20drivers/hive2/slf4j-log4j12-1.6.1.jar 
2013-09-27 12:16 INFO  ConnectionMgr.connect() Driver (org.apache.hive.jdbc.HiveDriver) does not support the autocommit property: enabling autocommit is not supported 
2013-09-27 12:16 INFO  DbMetadata.<init> Using DBID=hive 
2013-09-27 12:16 DEBUG GenericSchemaInfoReader.logSettings() Re-Use statement: false, cache current schema: false, SQL: null 
2013-09-27 12:16 ERROR DbMetadata.<init> Error when retrieving identifier quote character Method not supported
java.sql.SQLException: Method not supported
at org.apache.hive.jdbc.HiveDatabaseMetaData.getIdentifierQuoteString(HiveDatabaseMetaData.java:338)
at workbench.db.DbMetadata.<init>(DbMetadata.java:335)
at workbench.db.WbConnection.setSqlConnection(WbConnection.java:493)
at workbench.db.WbConnection.<init>(WbConnection.java:116)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:235)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:148)
at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:240)
at workbench.gui.components.ConnectionSelector$2.run(ConnectionSelector.java:138)

2013-09-27 12:16 INFO  DbMetadata.<init> Using quote escape character: " 
2013-09-27 12:16 INFO  DbMetadata.<init> Using search string escape character: \ 
2013-09-27 12:16 DEBUG DbMetadata.<init> Using table types returned by the JDBC driver: [EXTERNAL_TABLE, MANAGED_TABLE, VIRTUAL_VIEW] 
2013-09-27 12:16 DEBUG DbMetadata.<init> Using catalog separator: [.] 
2013-09-27 12:16 INFO  ConnectionMgr.getConnection() Connected to: [Hive], Database version: [0.10.0], Driver version: [0.12.0-SNAPSHOT], JDBC Version: [3.0], ID: [Wb1-16] 
2013-09-27 12:16 WARN  WbConnection.getDatabaseVersion() Error retrieving DB version (Method not supported) 
2013-09-27 12:16 ERROR SelectCommand.execute() Error executing:
drop table if exists reports.bob
   Method not supported
java.sql.SQLException: Method not supported
at org.apache.hive.jdbc.HiveStatement.setEscapeProcessing(HiveStatement.java:490)
at workbench.sql.commands.DdlCommand.execute(DdlCommand.java:111)
at workbench.sql.StatementRunner.runStatement(StatementRunner.java:422)
at workbench.gui.sql.SqlPanel.displayResult(SqlPanel.java:3062)
at workbench.gui.sql.SqlPanel.runStatement(SqlPanel.java:1998)
at workbench.gui.sql.SqlPanel$13.run(SqlPanel.java:1955)

2013-09-27 12:16 INFO  ConnectionMgr.disconnect() Disconnecting: [hive], ID=Wb1-16 
2013-09-27 12:16 INFO  WbManager.doShutdown() Stopping SQL Workbench/J, Build 115 
2013-09-27 12:16 INFO   =================== Log stopped =================== 

Thomas Kellerer

unread,
Sep 27, 2013, 12:32:27 PM9/27/13
to sql-wo...@googlegroups.com
Hi,

it seems the Hive JDBC is extremely badly implemented....

I added a new feature especially for DDL statements to disable the JDBC escapes (this is e.g. necessary if you want to create a Java stored procedure in Oracle).

It's calling Statement.setEscapeProcessing() and if I'm not mistaken that is actually a required method for any JDBC driver...


You can turn off calling that method using

WbSetConfig workbench.db.hive.ddl.disable.escapeprocessing=false


Regards
Thomas


Ryan wrote on 27.09.2013 18:27:
> I just installed the latest stable build and the "method not
> supported" error is thrown on statements that worked without issue in
> the previous release. Something as simple as /drop table if exists
> default.bob/ fails to run now. That is the statement I ran to
> generate this log:
>

ryan gordon

unread,
Sep 27, 2013, 12:39:27 PM9/27/13
to sql-wo...@googlegroups.com
Thanks for the quick response, Thomas. Disabling that setting resolved the issue.

You are right about the state of the Hive JDBC driver.  One of the many joys that comes with working on a relatively new platform unfortunately. 
--
You received this message because you are subscribed to a topic in the Google Groups "SQL Workbench/J - DBMS independent SQL tool" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sql-workbench/CIdAnVIhQdk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sql-workbenc...@googlegroups.com.

Graham Twine

unread,
Mar 31, 2015, 3:56:19 AM3/31/15
to sql-wo...@googlegroups.com
Hi Thomas, where is this property set?

Thomas Kellerer

unread,
Mar 31, 2015, 3:58:06 AM3/31/15
to sql-wo...@googlegroups.com
Please see the description in the manual about what WbSetConfig does:

http://www.sql-workbench.net/manual/wb-commands.html#command-setconfig

Thomas

Graham Twine

unread,
Mar 31, 2015, 4:59:51 AM3/31/15
to sql-wo...@googlegroups.com
Thanks for the prompt response, it is truly appreciated!!

Graham
To unsubscribe from this group and all its topics, send an email to sql-workbench+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages