ERROR [DruidDataSource.java:2471] create connection SQLException, url:************:3306/work_order?u

今天从代码库拉代码后,报如下错误:

2020-05-29 14:36:56,493 ERROR [DruidDataSource.java:2471] create connection SQLException, url:************:3306/work_order?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false, errorCode 0, state 08001
java.sql.SQLNonTransientConnectionException: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near ';characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false'.
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
  at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:79)
  at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:131)
  at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:227)
  at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:156)
  at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218)
  at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
  at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1560)
  at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1623)
  at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468)
Caused by: com.mysql.cj.exceptions.UnableToConnectException: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near ';characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false'.
  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.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
  ... 7 common frames omitted
Caused by: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near ';characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false'.
  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.conf.ConnectionUrlParser.processKeyValuePattern(ConnectionUrlParser.java:539)
  at com.mysql.cj.conf.ConnectionUrlParser.parseQuerySection(ConnectionUrlParser.java:519)
  at com.mysql.cj.conf.ConnectionUrlParser.getProperties(ConnectionUrlParser.java:644)
  at com.mysql.cj.conf.ConnectionUrl.collectProperties(ConnectionUrl.java:303)
  at com.mysql.cj.conf.ConnectionUrl.(ConnectionUrl.java:288)
  at com.mysql.cj.conf.url.SingleConnectionUrl.(SingleConnectionUrl.java:47)
  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.util.Util.handleNewInstance(Util.java:191)
  at com.mysql.cj.util.Util.getInstance(Util.java:166)
  at com.mysql.cj.util.Util.getInstance(Util.java:173)
  at com.mysql.cj.conf.ConnectionUrl.getConnectionUrlInstance(ConnectionUrl.java:200)
  at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:204)
  ... 6 common frames omitted

但是同事和我的配置都是一样的,代码也都是一样的,怎么就我有这个错误呢???百度了巨多内容,都是说url问题,但是这个和我没关系。maven上拉的是5.1的版本,更何况别人都可以。。。倒腾了很久,打开project structure,终于给我逮到了!!!如下:
在这里插入图片描述
就是这个玩意把maven下的5.1覆盖了,把这个删掉后终于不报错了,太难了!!!

你可能感兴趣的:(琐事)