首页 文章

将Hive连接到SpagoBI:org.eclipse.birt.report.data.oda.jdbc.JDBCException:没有合适的驱动程序

提问于
浏览
0

我正在尝试将spagoBI工作室连接到蜂巢 . 但是当我尝试为hive服务器添加数据源时,我在测试连接时遇到了以下异常 .

org.eclipse.birt.report.data.oda.jdbc.JDBCException:没有合适的驱动程序 . 在Org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.testConnection(JDBCDriverManager.java:729)org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader . java:147)atg.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:138)org.eclipse.birt.report.data.oda.hive.ui . 在org.eclipse.birt.report的org.eclipse.birt.report.data.oda.hive.ui.profile.HiveSelectionPageHelper.access $ 4(HiveSelectionPageHelper.java:392)上的profile.HiveSelectionPageHelper.testConnection(HiveSelectionPageHelper.java:404)位于org.eclipse.swt.widgets的org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)的.data.oda.hive.ui.profile.HiveSelectionPageHelper $ 2.widgetSelected(HiveSelectionPageHelper.java:333) . org.eclipse.swt.widgets.Wind.sendEvent(Widget.java:1053)上的orc.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)中的eventTable.sendEvent(EventTable.java:84) .eclipse.swt.widgets.Display.readAndDispat ch(Display.java:3657)org.eclipse.windows.window.runEventLoop(Window.java:825)org.eclipse.window.window.open(Window.java:801)atg.eclipse位于org.eclipse.jface.action的org.eclipse.jface.action.Action.runWithEvent(Action.java:498)的.birt.report.designer.data.ui.actions.NewDataSourceAction.run(NewDataSourceAction.java:126) .ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)org.eclipse.jface.action.ActionContributionItem.access $ 2(ActionContributionItem.java:501)org.eclipse.jface.action.ActionContributionItem $ 5.handleEvent(ActionContributionItem.java:411) )org.eclipse.swt.wtits.EventTable.sendEvent(EventTable.java:84)org.eclipse.swt.widgets.Wind.sendEvent(Widget.java:1053)org.eclipse.swt.widgets.Display上的org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) . 在org.eclipse上的org.eclipse.wt.widgets.Display.readAndDispatch(Display.java:3657)的orDe.e.e.Mer上的orr.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)的runDeferredEvents(Display.java:4066) .ui.internal.Workbench.runUI(禾rkbench.java:2604)在org.eclipse上的org.eclipse.ui.internal.Workbench.access $ 4(Workbench.java:2438)org.eclipse.ui.internal.Workbench $ 7.run(Workbench.java:671)位于org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java)的org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)的.core.databinding.observable.Realm.runWithDefault(Realm.java:332) :149)org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)at org . eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)位于org.eclipse.core的org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) . runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)位于sun的sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)的org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) . reflect.Nat位于org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:)的java.lang.reflect.Method.invoke(未知来源)的sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源)的iveMethodAccessorImpl.invoke(未知来源) 620)org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)org.eclipse.equinox.launcher.Main.run(Main.java:1408)org.eclipse.equinox.launcher.Main . 主要(Main.java:1384)

请帮助 .

1 回答

  • 0

    在创建连接时在连接配置文件中创建数据库连接“ GenericJDBC ”,然后单击“下一步” . 提供 General Tab 中的所有详细信息,然后单击 add jars 上方的三角形: - hive-jdbc,hive-exec,hive-metastore,hive-service,libfb,libthrift,hive-common,commons-logging,slf4j.api,hadoop- core,hadoop-common,hadoop-thriftfs,commons-cli,log4j,guava,commons-collections,commons-configurations,hadoop-auth,hadoop-hdfs

    我没有提到 jar 的版本,因为我不知道你使用哪些 jar . 您可能需要查看您的hadoop和hive版本以找到上述 jar 的版本 . 在proerties标签提供所有细节适用 .

    要选择驱动程序,请在属性选项卡中,单击“驱动程序”选项旁边带有3个点(...)的按钮,然后转到“ browse for class " option. It will show all the available drivers from the list of jars. From there, depending on the version of the hiveserver that you are using select the corresponding driver. For hive2 :-select " org.apache.hive.jdbc.HiveDriver ". otherwise :- select " org.apache.hadoop.hive.jdbc.HiveDriver

    然后单击确定和测试连接 .

    我希望它有所帮助 .

相关问题