请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

验证DAO出现问题

at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)
at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:132)
at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2243)
at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2267)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1319)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:966)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825)
... 12 common frames omitted

19:27:05.186 [C3P0PooledConnectionPoolManager[identityToken->bxijghw8xq5giqyxjo|3590fc5b]-HelperThread-#2] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - An exception occurred while acquiring a poolable resource. Will retry.
java.sql.SQLException: The server time zone value ‘AEST’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
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:76)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:455)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
at com.mchange.v2.resourcepool.BasicResourcePool.access700(BasicResourcePool.java:44)atcom.mchange.v2.resourcepool.BasicResourcePool700(BasicResourcePool.java:44) at com.mchange.v2.resourcepool.BasicResourcePool700(BasicResourcePool.java:44)atcom.mchange.v2.resourcepool.BasicResourcePoolScatteredAcquireTask.run(BasicResourcePool.java:1908)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value ‘AEST’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

检查了挺久的,但是还是不知道问题出在哪里,麻烦老师帮看看

正在回答 回答被采纳积分+3

插入代码

2回答

提问者 Mango15298 2020-08-30 15:29:58

Aug 30, 2020 5:16:37 PM org.springframework.test.context.support.DefaultTestContextBootstrapper getDefaultTestExecutionListenerClassNames

INFO: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]

Aug 30, 2020 5:16:37 PM org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners

INFO: Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@62043840, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@5315b42e, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@2ef9b8bc, org.springframework.test.context.support.DirtiesContextTestExecutionListener@5d624da6, org.springframework.test.context.transaction.TransactionalTestExecutionListener@1e67b872, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@60addb54]

Aug 30, 2020 5:16:37 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions

INFO: Loading XML bean definitions from class path resource [spring/spring-dao.xml]

Aug 30, 2020 5:16:38 PM org.springframework.context.support.GenericApplicationContext prepareRefresh

INFO: Refreshing org.springframework.context.support.GenericApplicationContext@735b5592: startup date [Sun Aug 30 17:16:38 AEST 2020]; root of context hierarchy

17:16:39.105 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.

17:16:39.125 [main] DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner - Creating MapperFactoryBean with name 'areaDao' and 'com.imooc.o2o.dao.AreaDao' mapperInterface

17:16:39.258 [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.

17:16:39.267 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - Reading VM config for path list /com/mchange/v2/log/default-mchange-log.properties, /mchange-commons.properties, /c3p0.properties, hocon:/reference,/application,/c3p0,/, /mchange-log.properties, /

17:16:39.267 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.

17:16:39.267 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier '/c3p0.properties' could not be found. Skipping.

17:16:39.267 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier 'hocon:/reference,/application,/c3p0,/' could not be found. Skipping.

17:16:39.267 [MLog-Init-Reporter] DEBUG com.mchange.v2.log.MLog - The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping.

17:16:39.286 [main] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.

17:16:39.286 [main] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping.

17:16:39.286 [main] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier 'hocon:/reference,/application,/c3p0,/' could not be found. Skipping.

17:16:39.286 [main] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier '/c3p0.properties' could not be found. Skipping.

17:16:39.424 [main] INFO com.mchange.v2.uid.UidUtils - Failed to get local InetAddress for VMID. This is unlikely to matter. At all. We'll add some extra randomness

java.net.UnknownHostException: ð: ð: nodename nor servname provided, or not known

感谢老师, 修改之后Junit变绿了但是console输出这些没问题吗之前没想到时区也会有问题 - -


0 回复 有任何疑惑可以回复我~
翔仔 2020-08-29 23:17:24

同学好,关键的问题在于

The server time zone value ‘AEST’ is unrecognized or represents more than one time zone

可以参考

https://www.jianshu.com/p/6e4d372bd2c7

设置mysql jdbc.properties里面的url里面的timezone

0 回复 有任何疑惑可以回复我~
  • 提问者 Mango15298 #1
    感谢老师, 修改之后Junit变绿了但是console输出上面这些,这样没问题吗  之前没想到时区也会有问题 - -
    回复 有任何疑惑可以回复我~ 2020-08-30 15:30:32
  • 翔仔 回复 提问者 Mango15298 #2
    应该没影响,想要解决的话可以试试这个
    https://www.jianshu.com/p/a07b75e2a6ef
    回复 有任何疑惑可以回复我~ 2020-08-31 00:32:18
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信