DB2 java.lang.NoClassDefFoundError:com/ibm/db2/jcc/SQLJContext

1、需要安装DB2的补丁包;

2、将db2下的3个驱动(最新的)拷贝到websphere下;

*********************************************************

ibm 

*********************************************************

Technote (troubleshooting)


Problem(Abstract)

When configuring an IBM® WebSphere® Application Server datasource for DB2® database access using the db2jcc.jar driver (DB2 Universal Java Database Connectivity (JDBC) Driver Provider), an exception might occur when the application tries to access the database, even though "Test Connection" worked fine.

Symptom

When the application tries to access the database for the first time, an exception similar to this is logged in the server's Systemout.log:

[24.07.08 08:32:55:463 CEST] 00000110 SystemOut O - 
reserveHostConnection(String, String) Unexpected Error:
java.lang.NoClassDefFoundError: com/ibm/db2/jcc/SQLJContext 
at java.lang.ClassLoader.defineClass0(Native Method) 

Cause

Check the version of the db2jcc.jar which is used by WebSphere. Some older DB2 drivers do not contain the SQLJContext.class at all.


Check the SystemOut.log for the JDBC driver version:

[25.08.08 09:52:25:506 CEST] 00000110 InternalGener I DSRA8206I: JDBC Driver Version: 1.3.70 
JDBC Driver Version 1.3.70 is the one delivered with DB2 v8.1 Fixpack 3.

The minimum DB2 v8 prereq for WebSphere Application Server v6.0.2 (all modifications) is DB2 v8.1 FP6a, which implements JDBC Driver Version 2.2.49


Resolving the problem

Replace the db2jcc.jar on the Application Server system with a newer driver version that implements SQLJContext.class

Use at least the version which is listed as a prerequisite for your WebSphere Application Server version (see "related URLs" below).


Related information

IBM DB2 JDBC driver versions
Supported DB2 levels for Application Server V6.0.2
Supported DB2 levels for Application Server V6.1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值