carriesa 2019-04-09 18:33 采纳率: 0%
浏览 1619

c3p0遇到报错: 对实体 "serverTimezone" 的引用必须以 ';' 分隔符结尾”

已将&修改但仍然报错“对实体 "serverTimezone" 的引用必须以 ';' 分隔符结尾”

<property name="jdbcUrl">jdbc:mysql://localhost:3306/chapter02?useSSL=true&amp;serverTimezone=UTC</property>

甚至尝试删掉此文件依旧是这样报错

四月 09, 2019 6:27:47 下午 com.mchange.v2.log.MLog
信息: MLog clients using java 1.4+ standard logging.
[Fatal Error] :7:94: 对实体 "serverTimezone" 的引用必须以 ';' 分隔符结尾。
四月 09, 2019 6:27:47 下午 com.mchange.v2.c3p0.cfg.C3P0Config
警告: XML configuration disabled! Verify that standard XML libs are available.
org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 94; 对实体 "serverTimezone" 的引用必须以 ';' 分隔符结尾。
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
at com.mchange.v2.c3p0.cfg.C3P0ConfigXmlUtils.extractXmlConfigFromInputStream(C3P0ConfigXmlUtils.java:148)
at com.mchange.v2.c3p0.cfg.C3P0ConfigXmlUtils.extractXmlConfigFromDefaultResource(C3P0ConfigXmlUtils.java:131)
at com.mchange.v2.c3p0.cfg.DefaultC3P0ConfigFinder.findConfig(DefaultC3P0ConfigFinder.java:62)
at com.mchange.v2.c3p0.cfg.C3P0Config.(C3P0Config.java:104)
at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.(PoolBackedDataSourceBase.java:49)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.(AbstractPoolBackedDataSource.java:74)
at com.mchange.v2.c3p0.ComboPooledDataSource.(ComboPooledDataSource.java:134)
at com.mchange.v2.c3p0.ComboPooledDataSource.(ComboPooledDataSource.java:130)
at com.mchange.v2.c3p0.ComboPooledDataSource.(ComboPooledDataSource.java:207)
at cn.itcast.jdbc.example.Example05.(Example05.java:8)

四月 09, 2019 6:27:48 下午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.2.1 [built 20-March-2013 11:16:28 +0000; debug? true; trace: 10]
四月 09, 2019 6:27:48 下午 com.mchange.v2.c3p0.cfg.C3P0Config getUnspecifiedUserProperties
警告: named-config with name 'itcast' does not exist. Using default-config.
四月 09, 2019 6:27:48 下午 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> itcast, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> null, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge13ba2gdkdl1e9vvli|65b3120a, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
四月 09, 2019 6:28:19 下午 com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask run
警告: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@1c02988a -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:315)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:648)

四月 09, 2019 6:28:19 下午 com.mchange.v2.resourcepool.BasicResourcePool forceKillAcquires
警告: Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@6bc168e5 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
Exception in thread "main" java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:689)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
at cn.itcast.jdbc.example.Example05.main(Example05.java:12)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1418)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:606)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:526)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:755)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:682)
... 2 more

  • 写回答

1条回答 默认 最新

  • carriesa 2019-04-09 20:15
    关注

    原来只是因为我problems没有清理。如果没有problem窗口可以通过window-show view打开

    评论

报告相同问题?

悬赏问题

  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题