Pentaho Spoon 由于缺少'驱动程序(jar 文件)而无法连接到 IBM DB2 数据库

Pentaho Spoon unable to connect to IBM DB2 database due to a missing'driver (jar file)

我正在使用 Pentaho 的勺子。当我尝试连接到 IBM DB2 数据库时,出现以下错误

`Driver class 'com.ibm.db2.jcc.DB2Driver' could not be found, make sure the 'IBM DB2' driver (jar file) is installed. com.ibm.db2.jcc.DB2Driver

我在 google 上进行了搜索,但没有找到任何内容。

IBM 数据服务器驱动程序可以从相关的 support page or the overall download page. The links can be found by Google or in the DB2 Knowledge Center 下载。

我今天遇到了同样的问题。 虽然错误消息说明需要做什么:

Driver class 'com.ibm.db2.jcc.DB2Driver' could not be found, make sure the 'IBM DB2' driver (jar file) is installed. com.ibm.db2.jcc.DB2Driver

仍然需要更多信息来解决这个问题。

从 Pentaho 获取确切的驱动程序 JDBC drivers reference. 下载后;将适当的 .jars 放在 Pentaho 工具的 lib 目录中。就我而言,我在 windows

上使用 Spoon

所以位置是:

C:\PathToWhereSpoonIsRunningFrom\pdi-ce-8.2.0.0-342\data-integration\lib

文件将是:

db2jcc.jar db2jcc4.jar db2jcc_license_cu.jar

完整的错误信息:

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

Driver class 'com.ibm.db2.jcc.DB2Driver' could not be found, make sure the 'IBM DB2' driver (jar file) is installed.
com.ibm.db2.jcc.DB2Driver


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

Driver class 'com.ibm.db2.jcc.DB2Driver' could not be found, make sure the 'IBM DB2' driver (jar file) is installed.
com.ibm.db2.jcc.DB2Driver


    at org.pentaho.di.core.database.Database.normalConnect(Database.java:472)
    at org.pentaho.di.core.database.Database.connect(Database.java:370)
    at org.pentaho.di.core.database.Database.connect(Database.java:341)
    .
    .
    .
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
Driver class 'com.ibm.db2.jcc.DB2Driver' could not be found, make sure the 'IBM DB2' driver (jar file) is installed.
com.ibm.db2.jcc.DB2Driver

    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:515)
    at org.pentaho.di.core.database.Database.normalConnect(Database.java:456)
    ... 56 more
Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
    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:490)
    ... 57 more

Hostname: YourHostname
Port: YourPortNumber
Database name: YourDBName