无法通过Pentaho连接到oracle.找不到'oracle.jdbc.driver.OracleDriver'

 lxm淡淡嘚甜_671 发布于 2023-02-12 18:05

嗨,我刚刚安装了Pentaho Data Integration v.5.01,我正在尝试连接数据库.但是,当我收到错误(粘贴在下面)时,我无法测试连接.

我也在系统上安装了JDK 1.7,但是我似乎无法在任何地方找到ojdbc14.jar.

我下载并将其粘贴在pentaho的\ lib文件夹中,但我仍然得到同样的错误.

解决这个问题的任何方法?

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

Driver class 'oracle.jdbc.driver.OracleDriver' could not be found, make sure the 'Oracle' driver (jar file) is installed.
oracle.jdbc.driver.OracleDriver


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

Driver class 'oracle.jdbc.driver.OracleDriver' could not be found, make sure the 'Oracle' driver (jar file) is installed.
oracle.jdbc.driver.OracleDriver


    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.newConnection(SpoonDBDelegate.java:493)
    at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:478)
    at org.pentaho.di.ui.spoon.Spoon.doubleClickedInTree(Spoon.java:2885)
    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: 
Driver class 'oracle.jdbc.driver.OracleDriver' could not be found, make sure the 'Oracle' driver (jar file) is installed.
oracle.jdbc.driver.OracleDriver

    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:474)
    at org.pentaho.di.core.database.Database.normalConnect(Database.java:399)
    ... 45 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    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 org.pentaho.di.core.database.Database.connectUsingClass(Database.java:467)
    ... 46 more

小智.. 16

尝试将odbc jar文件(例如:ojdbc5-11.1.0.7.0.jar)放在安装的"data-integration/lib "目录中.不要忘记重启Pentaho以使其工作.

3 个回答
  • 尝试将odbc jar文件(例如:ojdbc5-11.1.0.7.0.jar)放在安装的"data-integration/lib "目录中.不要忘记重启Pentaho以使其工作.

    2023-02-12 18:06 回答
  • 这是我的设置.我有这个问题,并设法修复如下.

    我在我的机器上运行了SQLDeveloper,它工作正常,即使在VPN下也是如此.但是,我正在运行Spoon并注意到如果我使用VPN它将无法工作.

    我试图将SQLDeveloper附带的Oracle JDBC驱动程序放入Pentaho.那没用.

    但是,我注意到SQLDeveloper和Spoon之间的一个重要区别是它们使用不同的Java运行时和JDBC Oracle驱动程序!特别是,我的SQLDeveloper版本在32位JRE版本1.6.0_11上运行,而我的系统级JDK是64位版本1.7.0_03.

    我找到了SQLDeveloper使用的JDBC驱动程序,并将它们用作Spoon附带的驱动程序的替代品 - 没有变化.

    然后我重新定位Spoon以使用SQLDeveloper使用的Java运行时.

    我设置了两个环境变量:PENTAHO_JAVA和PENTAHO_JAVA_HOME - 它现在正常工作!

    作为参考,这是我的envvars:

    PENTAHO_JAVA=C:\opt\sqldeveloper\jdk\jre\bin\java.exe
    PENTAHO_JAVA_HOME=c:\opt\sqldeveloper\jdk\jre\
    

    如果这是相关的,我在Windows 7 x64上.

    2023-02-12 18:07 回答
    1. 首先访问Oracle站点:http: //www.oracle.com/technetwork/database/features/jdbc/index-091264.html

      下载1个文件:ojdbc6.jar(2,739,670字节) - (SHA1校验和:a483a046eee2f404d864a6ff5b09dc0e1be3fe6c)用于JDK 1.6的类.它包含JDBC驱动程序类,但Oracle Object和Collection类型中的NLS支持类除外.

      将其复制到Pentaho文件夹:C:\ Program Files\Pentaho\data-integration\lib

    这适用于我的Windows 7 X64 Pro和最新的Pentaho 5.3 Stable.

    2023-02-12 18:07 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有