关于在maven项目中如何添加DB2的坐标的详细,见:https://www.cnblogs.com/zifeiy/p/7918554.html

Spring Boot项目中的application.properties文件内容如下:

# DB Configuration for DB2
spring.datasource.url=jdbc:db2://localhost:50000/SAMPLE
spring.datasource.username=zifeiy
spring.datasource.password=passwd
spring.datasource.driver-class-name=com.ibm.db2.jcc.DB2Driver
# logging
logging.level.com.zifeiy.demo=debug

后来发现这个其实是没有问题的。

解决办法是将:db2jcc的dependency去掉,留下db2jcc4就可以了。

也就是说,以下内容在pom.xml中要注释掉:

		<!-- https://mvnrepository.com/artifact/com.ibm.db2/db2jcc -->
<!-- dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc</artifactId>
<version>8.1</version>
</dependency> -->

参考链接:https://stackoverflow.com/questions/37193965/java-lang-abstractmethoderror-com-ibm-db2-jcc-t4-b-isvalidiz

Spring Boot连接DB2查询结果时报错“java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z”的解决办法的更多相关文章

  1. 关于spring boot在启动的时候报错: java.lang.Error: generate operation swagger failed, xxx.xxx.xxx

    Error starting ApplicationContext. To display the auto-configuration report re-run your application ...

  2. springboot集成springcloud,启动时报错java.lang.AbstractMethodError: null

    出现这个问题是springboot和springcloud的版本不匹配. 我此处使用了springboot 2.0.4.RELEASE,springcloud 使用了Finchley.SR2. 修改方 ...

  3. shiro使用redis作为缓存,出现要清除缓存时报错 java.lang.Exception: Failed to deserialize at org.crazycake.shiro.SerializeUtils.deserialize(SerializeUtils.java:41) ~[shiro-redis-2.4.2.1-RELEASE.jar:na]

    shiro使用redis作为缓存,出现要清除缓存时报错 java.lang.Exception: Failed to deserialize at org.crazycake.shiro.Serial ...

  4. 使用RestTemplate时报错java.lang.IllegalStateException: No instances available for 127.0.0.1

    我在RestTemplate的配置类里使用了 @LoadBalanced@Componentpublic class RestTemplateConfig { @Bean @LoadBalanced ...

  5. 运用反射时报错java.lang.NoSuchMethodException,以解决,记录一下

    问题:想调用service类中的私有方法时, Method target=clz.getMethod("say", String.class);用Class的getMethod报错 ...

  6. Java集成POI进行Excele的导入导出,以及报错: java.lang.AbstractMethodError..........

    报错信息如下 java.lang.AbstractMethodError: org.apache.poi.xssf.usermodel.XSSFCell.setCellType(Lorg/apache ...

  7. Spring Boot应用上传文件时报错

    问题描述 Spring Boot应用(使用默认的嵌入式Tomcat)在上传文件时,偶尔会出现上传失败的情况,后台报错日志信息如下:"The temporary upload location ...

  8. spring Mongodb查询索引报错 java.lang.NumberFormatException: empty String

    最近事情比较多,本篇文章算是把遇到的问题杂糅到一起了. 背景:笔者最近在写一个mongo查询小程序,由于建立索引时字段名用大写,而查询的时候用小写. 代码如下: db.getCollection(&q ...

  9. mybatis mapper.xml 写关联查询 运用 resultmap 结果集中 用 association 关联其他表 并且 用 association 的 select 查询值 报错 java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mybatis.map

    用mybaits 写一个关联查询 查询商品表关联商品规格表,并查询规格表中的数量.价格等,为了sql重用性,利用 association 节点 查询 结果并赋值报错 商品表的mapper文件为Gooo ...

随机推荐

  1. ZZNUOJ-2155-单身man集合-【标程做法:数位DP-1-10^8,提前暴力打表法: 砍时间复杂度到10^5】

    ZZNUOJ-2155: 单身MAN集合 题目描述: 单身man们突然集结起来了,虽然我们不知道它们想要干什么.你作为单身man的首领需要管理好每一只单身man,机智的你给每一只单身man编了一个编号 ...

  2. python的变量命名规范

    一.python变量名命名规则: 1.变量名通常由字母,数字,下划线组成; 2.数字不能作为变量名开头; 3.不能以python中的关键字命名; 4.变量名要有意义; 5.不要用汉字和拼音去命名; 6 ...

  3. git 在eclipse中忽略上传文件

    在我们的工程项目中,有些文件是不需要上传到服务器上的,比如那些 */target/ */bin/*.settings/*.classpath*.gitignore*.project 我们将这些文件添加 ...

  4. Educational Codeforces Round 72 (Rated for Div. 2) A题

    Problem Description: You play your favourite game yet another time. You chose the character you didn ...

  5. 000_linux之Ubuntu安装

    今天2018/6/1 今天是六一儿童节,天气凉爽,心情挺好的.然后本着开开心心的心情,将前面忘记写linux的Ubuntu没安装的写一下,以后自己回来看就很方便了.使用的是白问网制作的ubuntu,假 ...

  6. pyecharts v1 版本 学习笔记 折线图,面积图

    折线图 折线图 基本demo import pyecharts.options as opts from pyecharts.charts import Line c = ( Line() .add_ ...

  7. soapui如何发送xml格式的字符串

    一个服务需要的xml格式的字符串参数,用soapUI传递参数时要这样写: <![CDATA[<?xml version="1.0" encoding="UTF ...

  8. MultipartFile 类

    本文链接:https://blog.csdn.net/Peter_S/article/details/84951978今天说下 MultipartFile 这个类吧,这两天正在用,也在网上查了查资料, ...

  9. MyBatisPLus入门项目实战各教程目录汇总

    https://blog.csdn.net/BADAO_LIUMANG_QIZHI/column/info/37194 http://www.imooc.com/article/details/id/ ...

  10. Poj 2976 Dropping tests(01分数规划 牛顿迭代)

    Dropping tests Time Limit: 1000MS Memory Limit: 65536K Description In a certain course, you take n t ...