爷可是个天才 2020-12-27 22:57 采纳率: 81%
浏览 373
已采纳

spring boot整合mybatis时报空指针异常

java.lang.NullPointerException: null
	at com.alibaba.druid.wall.WallProvider.checkInternal(WallProvider.java:701) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.wall.WallProvider.check(WallProvider.java:578) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.wall.WallFilter.checkInternal(WallFilter.java:793) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:788) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.wall.WallFilter.statement_execute(WallFilter.java:421) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2474) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2474) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.execute(StatementProxyImpl.java:147) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.pool.vendor.MSSQLValidConnectionChecker.isValidConnection(MSSQLValidConnectionChecker.java:50) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1384) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:3056) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.pool.DruidDataSource$DestroyTask.run(DruidDataSource.java:2793) ~[druid-1.1.17.jar:1.1.17]
	at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:2777) ~[druid-1.1.17.jar:1.1.17]

项目可以启动,而且隔几秒这个相同的异常又多一个

  • 写回答

1条回答 默认 最新

  • 暴躁码农 2020-12-28 15:22
    关注

    驱动包和数据库版本匹配么?

    com.mysql.jdbc.Driver 是 mysql-connector-java 5及5之前的,

    com.mysql.cj.jdbc.Driver 是 mysql-connector-java 6及6之后的。

    对照下吧

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥25 C语言代码,大家帮帮我
  • ¥15 请问以下文字内容及对应编码是用了什么加密算法或压缩算法呢?
  • ¥50 关于#html5#的问题:H5页面用户手机返回的时候跳转到指定页面例如(语言-javascript)
  • ¥15 无法使用此凭据登录,因为你的域不可用,如何解决?(标签-Windows)
  • ¥15 yolov9的训练时间
  • ¥15 二叉树遍历没有报错但无法正常运行
  • ¥15 在linux系统下vscode运行robocup3d上场球员报错
  • ¥15 Python语言实验
  • ¥15 SAP HANA SQL 增加合计行
  • ¥20 用C#语言解决一个英文打字练习器,有偿