zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    linux的mount(挂载)NFS 共享,命令详解
    Ubuntu 14.04下NFS安装配置
    linux下实现ftp匿名用户的上传和下载文件功能
    ubuntu apache2配置详解(含虚拟主机配置方法)
    在Ubuntu Server下搭建LAMP环境
    RPM 命令
    阿里云主机ssh 免密码登录
    PHPMailer使用说明
    git的一些基础命令
    穿线
  • 原文地址:https://www.cnblogs.com/duanxz/p/3131811.html
Copyright © 2011-2022 走看看