开发者社区> 问答> 正文

kettle3.2 创建oracle连接,在Test的时候报错:Could no?报错

错误如下:Could not initialize class oracle.jdbc.driver.OracleDriver。

详细描述:kettle3.2数据采集

                环境变量设置:KETTLE_HOME    D:\kettle\data-integration

                                                Path         % KETTLE_HOME%       

                当我打开软件新建一个oracle连接,Test时出现了如下的信息:    

下面是整个异常信息栈:

错误连接数据库 [repo] : org.pentaho.di.core.exception.KettleDatabaseException: 
Error occured while trying to connect to the database

Exception while loading class
Could not initialize class oracle.jdbc.driver.OracleDriver


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

Exception while loading class
Could not initialize class oracle.jdbc.driver.OracleDriver


at org.pentaho.di.core.database.Database.normalConnect(Database.java:312)
at org.pentaho.di.core.database.Database.connect(Database.java:261)
at org.pentaho.di.core.database.Database.connect(Database.java:223)
at org.pentaho.di.core.database.Database.connect(Database.java:213)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:55)
at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2409)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:487)
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:294)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:124)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:112)
at org.pentaho.ui.xul.swt.tags.SwtButton.access$000(SwtButton.java:17)
at org.pentaho.ui.xul.swt.tags.SwtButton$1.widgetSelected(SwtButton.java:77)
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:238)
at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:161)
at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:44)
at org.pentaho.di.ui.repository.dialog.RepositoryDialog$1.widgetSelected(RepositoryDialog.java:177)
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.repository.dialog.RepositoryDialog.open(RepositoryDialog.java:294)
at org.pentaho.di.ui.repository.dialog.RepositoriesDialog$3.widgetSelected(RepositoriesDialog.java:311)
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.repository.dialog.RepositoriesDialog.open(RepositoriesDialog.java:427)
at org.pentaho.di.ui.spoon.Spoon.openRepositoryDialog(Spoon.java:5361)
at org.pentaho.di.ui.spoon.Spoon.selectRep(Spoon.java:5418)
at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:5548)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:412)
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:116)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
Exception while loading class
Could not initialize class oracle.jdbc.driver.OracleDriver

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:361)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:296)
... 48 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class oracle.jdbc.driver.OracleDriver
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:357)
... 49 more

主机名       : 127.0.0.1
端口           : 1521
数据库名:repo

希望各位高手曾经遇到这个问题的人,为小弟指点迷津。给分不是问题。

展开
收起
爱吃鱼的程序员 2020-06-22 20:36:25 714 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    没有oracle的jdbc包,下载一个放到kettle的lib目录下就行(目录名记的不太清楚了)

    话说oracle也挺坑爹的,就是不让第三方发布,maven库里也没有。

    下载ojdbc14.jar放进\data-integration\libext目录里面即可。

    楼主,我有个问题可以请教你吗?

    http://www.oschina.net/question/274478_105237

    求指教。

    2020-06-22 20:36:42
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_樊文凯_ORACLE数据库和应用异构迁移最佳实践 立即下载
PostgresChina2018_王帅_从Oracle到PostgreSQL的数据迁移 立即下载
Oracle云上最佳实践 立即下载

相关镜像