项目中使用了jta atomikos做分布式事务,druid做连接池,oracle数据库测试正常,添加mysql数据库报错.错误位置是com.alibaba.druid.util.MySqlUtils143行空指针异常(位置截图1).Druid连接池的bug(java.lang.NoSuchMethodException: PropertySet.getBooleanReadableProperty(java.lang.Stri)

查找给method_6_getBooleanReadableProperty赋值的地方(截图2).

Druid连接池的bug(java.lang.NoSuchMethodException: PropertySet.getBooleanReadableProperty(java.lang.Stri)

重点126行getMethod为null,报错: java.lang.NoSuchMethodException: PropertySet.getBooleanReadableProperty(java.lang.String),找到com.mysql.cj.conf.PropertySet接口确实没有这个方法,那就是兼容性问题了.换了几个版本的mysql驱动依然报错.后来看到122行注释// maybe 8.0.11 or higher version.可能阿里的同志们写这个类的时候mysql才发布到8.0.11,于是更改为8.0.11版本问题解决.

相关文章:

  • 2021-06-17
  • 2021-10-07
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
猜你喜欢
  • 2021-08-06
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-02-10
相关资源
相似解决方案