"Method not supported" with Hive JDBC

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.


I'm trying to get data from Hive using a JDBC driver in Jasper Studio. I'm using Jasper Studio 6.4.3, and I configure a new JDBC connection providing the JDBC jar. I've actually tried many different ones. When confguring my source, the "test" is working fine, and in the "dataset and query dialog", I can expand default => Table and I see my tables and its columns. Now, if I type a basic query to get fields, I got an error message: Method Not Supported":

net.sf.jasperreports.engine.JRException: java.sql.SQLFeatureNotSupportedException: Method not supported
    at com.jaspersoft.studio.data.jdbc.JDBCFieldsProvider.getFields(JDBCFieldsProvider.java:120)
    at com.jaspersoft.studio.data.jdbc.JDBCDataAdapterDescriptor.getFields(JDBCDataAdapterDescriptor.java:70)
    at com.jaspersoft.studio.property.dataset.dialog.DataQueryAdapters.doGetFields(DataQueryAdapters.java:518)
    at com.jaspersoft.studio.data.designer.AQueryDesignerContainer$1.run(AQueryDesignerContainer.java:49)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: java.sql.SQLFeatureNotSupportedException: Method not supported
    at org.apache.hive.jdbc.HiveResultSetMetaData.getTableName(HiveResultSetMetaData.java:102)
    at com.jaspersoft.studio.data.jdbc.JDBCFieldsProvider.getFields(JDBCFieldsProvider.java:112)
    ... 4 more

I'm using Hive 2.3. I've spent many days to Google and make some tests, but I'm really stuck there now

Thanks for your help



stephane.davy's picture
Joined: Nov 29 2013 - 12:13pm
Last seen: 2 years 1 month ago

2 Answers:


Answer to myself: the HIVE JDBC library provided by the Hive project doesn't implement all the methods, including the getTableName that raises this error. Using the Cloudera HIVE JDBC solves the issue.

stephane.davy's picture
Joined: Nov 29 2013 - 12:13pm
Last seen: 2 years 1 month ago

If you are trying to connect Jaspersoft to Hive then use JDBC driver >>com.cloudera.hive.jdbc4.HS2Driver
and JDBC URL >>jdbc:hive2://<server>:10000/<DB>;user=<username>;password=<password>

jar file is >>HiveJDBC4

user name and password here is optional.

ramrajchoudhary890's picture
Joined: Aug 28 2018 - 6:54pm
Last seen: 3 years 9 months ago