我正在使用 Pentaho 的勺子。当我尝试连接到 IBM DB2 数据库时,出现以下错误
`驱动程序类 'com.ibm.db2.jcc.DB2Driver' 找不到,请确保安装了 'IBM DB2' 驱动程序(jar 文件)。com.ibm.db2.jcc.DB2Driver
我在谷歌上搜索但找不到任何东西。
我正在使用 Pentaho 的勺子。当我尝试连接到 IBM DB2 数据库时,出现以下错误
`驱动程序类 'com.ibm.db2.jcc.DB2Driver' 找不到,请确保安装了 'IBM DB2' 驱动程序(jar 文件)。com.ibm.db2.jcc.DB2Driver
我在谷歌上搜索但找不到任何东西。
IBM 数据服务器驱动程序可以从相关支持页面或整体下载页面下载。可以通过 Google 或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 驱动程序参考中获取确切的驱动程序。
一旦你下载它; 把相应.jars
的放在lib
Pentaho的工具目录下。就我而言,我在 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