Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: error while connectting to hive(cloudera cdh4.5)

  1. #1

    Question error while connectting to hive(cloudera cdh4.5)

    My hive jdbc driver is hive-jdbc-0.10.0-cdh4.5.0.jar,and i have copy the 9 jars (included hive-builtins-0.10.0-cdh4.5.0.jar,hive-common-0.10.0-cdh4.5.0.jar,hive-contrib-0.10.0-cdh4.5.0.jar,hive-exec-0.10.0-cdh4.5.0.jar,hive-jdbc-0.10.0-cdh4.5.0.jar,hive-metastore-0.10.0-cdh4.5.0.jar,hive-serde-0.10.0-cdh4.5.0.jar,hive-service-0.10.0-cdh4.5.0.jar,hive-shims-0.10.0-cdh4.5.0.jar) to pentaho\design-tools\data-integration\lib and pentaho\design-tools\data-integration\plugins\pentaho-big-data-plugin\hadoop-configurations\cdh42\lib. And my hadoop is cloudera cdh4.5, I have successfully executed mapreduce job, but I cannt connect hive. The error like this:
    错误连接数据库 [hive] : org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database

    Error connecting to database: (using class org.apache.hadoop.hive.jdbc.HiveDriver)
    Unable to load Hive JDBC driver for the currently active Hadoop configuration


    org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database

    Error connecting to database: (using class org.apache.hadoop.hive.jdbc.HiveDriver)
    Unable to load Hive JDBC driver for the currently active Hadoop configuration


    at org.pentaho.di.core.database.Database.normalConnect(Database.java:415)
    at org.pentaho.di.core.database.Database.connect(Database.java:353)
    at org.pentaho.di.core.database.Database.connect(Database.java:306)
    at org.pentaho.di.core.database.Database.connect(Database.java:294)
    at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:84)
    at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2459)
    at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:541)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:139)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:123)
    at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:26)
    at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:121)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:375)
    at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:301)
    at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:115)
    at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:62)
    at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.editConnection(SpoonDBDelegate.java:88)
    at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:2900)
    at org.pentaho.di.ui.spoon.Spoon.access$2300(Spoon.java:332)
    at org.pentaho.di.ui.spoon.Spoon$27.widgetDefaultSelected(Spoon.java:5657)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1227)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7368)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:8673)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)
    Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    Error connecting to database: (using class org.apache.hadoop.hive.jdbc.HiveDriver)
    Unable to load Hive JDBC driver for the currently active Hadoop configuration

    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:540)
    at org.pentaho.di.core.database.Database.normalConnect(Database.java:399)
    ... 44 more
    Caused by: java.sql.SQLException: Unable to load Hive JDBC driver for the currently active Hadoop configuration
    at org.apache.hadoop.hive.jdbc.HiveDriver.getActiveDriver(HiveDriver.java:108)
    at org.apache.hadoop.hive.jdbc.HiveDriver.callWithActiveDriver(HiveDriver.java:122)
    at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:133)
    at org.pentaho.di.core.database.DelegatingDriver.connect(DelegatingDriver.java:31)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:528)
    ... 45 more
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.hadoop.hive.jdbc.HiveDriver.getActiveDriver(HiveDriver.java:106)
    ... 51 more
    Caused by: java.lang.NoClassDefFoundError: com/facebook/fb303/FacebookService$Iface
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.pentaho.hadoop.shim.common.DriverProxyInvocationChain.init(DriverProxyInvocationChain.java:89)
    at org.pentaho.hadoop.shim.common.DriverProxyInvocationChain.getProxy(DriverProxyInvocationChain.java:72)
    at org.pentaho.hadoop.shim.common.CommonHadoopShim.getJdbcDriver(CommonHadoopShim.java:100)
    ... 56 more
    Caused by: java.lang.ClassNotFoundException: com.facebook.fb303.FacebookService$Iface
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 94 more

    host name : 10.10.60.227
    port : 10000
    database:default


    who can help me? Thanks a lot

  2. #2
    Join Date
    Sep 2012
    Posts
    71

    Default

    You shouldn't copy those JARs up to the data-integration/lib folder, they'd only need to be in the "shim" you're using (in this case cdh42). Only the pentaho-hive-jdbc-shim JAR should be in the lib/ folder, and that is already in PDI so you don't need to copy anything there.

    Once you have set your shim to cdh42 (the value of the active.hadoop.configuration property in plugins/pentaho-big-data-plugin/plugin.properties), it might work with your CDH 4.5 cluster out-of-the-box. For example, the cdh42 shim has been verified by Pentaho to be compatible up to CDH 4.4. If something significant has changed in CDH 4.5, you can try replacing the hive-*.jar files in the cdh42/lib folder with the ones from your cluster (as you describe). But I would start first with a clean PDI (with none of your changes), set the shim to cdh42, and see if Hive works.

  3. #3

    Default

    Thank you very much. I still can not connect hive. I changed my Hadoop to CDH4.2, and also has errors like this:
    错误连接数据库 [hive] : org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database

    Error connecting to database: (using class org.apache.hadoop.hive.jdbc.HiveDriver)
    org.apache.thrift.transport.TTransportException: java.net.SocketException: Connection reset


    org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database

    Error connecting to database: (using class org.apache.hadoop.hive.jdbc.HiveDriver)
    org.apache.thrift.transport.TTransportException: java.net.SocketException: Connection reset


    at org.pentaho.di.core.database.Database.normalConnect(Database.java:415)
    at org.pentaho.di.core.database.Database.connect(Database.java:353)
    at org.pentaho.di.core.database.Database.connect(Database.java:306)
    at org.pentaho.di.core.database.Database.connect(Database.java:294)
    at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:84)
    at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2459)
    at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.test(DatabaseDialog.java:120)
    at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2.test(CreateDatabaseWizardPage2.java:167)
    at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2$3.widgetSelected(CreateDatabaseWizardPage2.java:156)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizard.createAndRunDatabaseWizard(CreateDatabaseWizard.java:115)
    at org.pentaho.di.ui.spoon.Spoon.createDatabaseWizard(Spoon.java:7033)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)

  4. #4

    Default

    I changed hive to hive2, and successful connect hive, but I can not explore the talbles or create table,the error like this:
    2013/12/20 15:24:14 - SQL - Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.