You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by Xuefu Zhang <xz...@cloudera.com> on 2014/06/18 18:42:27 UTC

Re: Unable to establish a JDBC connection to Hive in cloudera from SpagoBI server

Beeline is supposed to work with HS2. However, it seems you're trying to
connect to HS1. It might work, but never supported or documented.

--Xuefu


On Wed, Jun 18, 2014 at 1:44 AM, ashish sanadhya <sa...@gmail.com>
wrote:

> I am trying to establish JDBC connection to Hive of CDH4.6 with spagoBI,but
> when try to create data source in spagoBI ,i got an error
>
>     service error org.apache.hadoop.hive.jdbc.HiveDriver
>
> I have included following jar in my /spagoBI-server-4.2/lib folder
>
>  1. hadoop-core-2.0.0-mr1-cdh4.6.0.jar
>  2. hive-common-0.10.0-cdh4.6.0.jar
>  3. hive-metastore-0.10.0-cdh4.6.0.jar
>  4. hive-exec-0.10.0-cdh4.6.0.jar
>  5. hive-service-0.10.0-cdh4.6.0.jar
>  6. hive-jdbc-0.10.0-cdh4.6.0.jar
>  7. antlr-runtime-3.4.jar
>  8. commons-logging-1.1.1.jar
>  9. commons-logging-api-1.1.jar
>
> When I try connecting to Hive using beeline,i am able to see my tables.
>
>     beeline> !connect jdbc:hive://192.168.10.110:10000/default "" "" ""
>     scan complete in 30ms
>     Connecting to jdbc:hive://192.168.10.110:10000/default
>     SLF4J: Class path contains multiple SLF4J bindings.
>     SLF4J: Found binding in
>
> [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>     SLF4J: Found binding in
>
> [jar:file:/usr/lib/hive/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>     SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
>     Connected to: Hive (version 1)
>     Driver: Hive (version 0.10.0-cdh4.6.0)
>     Error: Method not supported (state=,code=0)
>     Error: Method not supported (state=,code=0)
>     Error: Method not supported (state=,code=0)
>     0: jdbc:hive://192.168.10.110:10000/default> show tables;
>     +------------+
>     |  tab_name  |
>     +------------+
>     | forex2     |
>     | hpv_1      |
>     | sample_07  |
>     | sample_08  |
>     +------------+
>     4 rows selected (1.337 seconds)
>
> some more google shows above error[
>
> http://stackoverflow.com/questions/19525071/classnotfoundexception-when-connecting-hive-from-a-java-client
> ]
> <
> http://stackoverflow.com/questions/19525071/classnotfoundexception-when-connecting-hive-from-a-java-client
> >
> and [JDBC-conection][
>
> http://stackoverflow.com/questions/22431984/unable-to-establish-a-jdbc-connection-to-hive-from-eclipse
> ],It seems to me a classpath error or hadoop-*-core.jar(because i am using
> cloudera),i have included following classpath before calling
> ./spagoBIStartup.sh
>
>     HADOOP_CORE={{ls $HADOOP_HOME/hadoop-*-core.jar}}
>     CLASSPATH=.:$HADOOP_CORE:$HIVE_HOME/conf
>
>     for i in ${HIVE_HOME}/lib/*.jar ; do
>         CLASSPATH=$CLASSPATH:$i
>     done
>
> Anything Missing for JDBC-HIVE connectivity in SpagoBI ?,thanks.
>   -Thanks.
> Ashish
>