oceanbase社区版:oceanbase-all-in-one-4.3.0.1-100000242024032211.el7.x86_64.tar.gz
MySQL驱动版本:mysql-connector-java-8.0.30
数据库链接池版本:druid-1.2.5
链接URL:String url = “jdbc:mysql://172.22.7.243:2883/test?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC&socketTimeout=120000&loginTimeout=50000&autoReconnect=true”;
每次连接都报一下错误:
Caused by: com.mysql.cj.exceptions.WrongArgumentException: Unknown ProtocolEntity class null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.protocol.a.ResultsetFactory.createFromProtocolEntity(ResultsetFactory.java:70)
at com.mysql.cj.protocol.a.ResultsetFactory.createFromProtocolEntity(ResultsetFactory.java:43)
at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:118)
at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:48)
at com.mysql.cj.protocol.a.NativeProtocol.read(NativeProtocol.java:1664)
at com.mysql.cj.protocol.a.NativeProtocol.readAllResults(NativeProtocol.java:1718)
at com.mysql.cj.NativeSession.loadServerVariables(NativeSession.java:455)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1297)
at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:861)
这个问题我咨询下相关同学,有进展回复你
可以降低一下版本试试,如果必须用 mysql 8.0 的驱动,可以换成 8.0.28 试试看。如果依然还是报错的话,麻烦把 obproxy 的日志一并贴出来,我来找对应的研发同学看一下。