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

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之后的。

    对照下吧

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

报告相同问题?

悬赏问题

  • ¥15 关于IMageEnView 图标定位问题
  • ¥20 求解答(matlab)
  • ¥30 ffmpeg库使用过程中遇到的问题
  • ¥15 pyqt5 中python如何通过Qtwebchannel主动发消息给web前端
  • ¥15 关于HTML中title获取xml内容的问题
  • ¥15 fanuc机器人PRIO083数字信号未复原错误,如何解决?
  • ¥20 如何为现有电路板增加远程控制功能
  • ¥15 UE5打包失败,求解决
  • ¥15 请问STM32G431的CANOPEN协议函数怎么写
  • ¥15 graphpad prism 三因素重复测定报错