解决异常:“Thelastpacketntsuccessfullytotherve。。。
今天写ssm的时候遇见⼀个错误,
我的报错如下
1警告: sourcepool.BasicResourcePool$ScatteredAcquireTask@21ee9275 -- Acquisition Attempt Failed Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maxim ptions.jdbc4.CommunicationsException: Communications link failure
3
4 The last packet nt successfully to the rver was 0 milliconds ago. The driver has not received any packets from the rver.
5 wInstance(Unknown Source)
6 wInstance(DelegatingConstructorAccessorImpl.java:45)
7 at wInstance(Constructor.java:423)
8 sql.jdbc.Util.handleNewInstance(Util.java:425)
9 sql.ateCommunicationsException(SQLError.java:990)
10 sql.jdbc.MysqlIO.<init>(MysqlIO.java:342)
11 sql.Connect(ConnectionImpl.java:2197)
12 sql.tOneTryOnly(ConnectionImpl.java:2230)
13 sql.ateNewIO(ConnectionImpl.java:2025)
14 sql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
15 sql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
16 wInstance(Unknown Source)
17 wInstance(DelegatingConstructorAccessorImpl.java:45)
18 at wInstance(Constructor.java:423)
19 sql.jdbc.Util.handleNewInstance(Util.java:425)
20 sql.Instance(ConnectionImpl.java:386)
21 sql.t(NonRegisteringDriver.java:330)
22 hange.v2.Connection(DriverManagerDataSource.java:175)
23 hange.v2.PooledConnection(WrapperConnectionPoolDataSource.java:220)
24 hange.v2.PooledConnection(WrapperConnectionPoolDataSource.java:206)
25 hange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
26 sourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
27 sourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
批准英文28 sourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
29 sourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
30 hange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
31 Caud by: ConnectException: Connection refud: connect
32 t0(Native Method)
33 DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
34 AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
35 tToAddress(AbstractPlainSocketImpl.java:206)
idleness36 t(AbstractPlainSocketImpl.java:188)
37 t(PlainSocketImpl.java:172)
38 t(SocksSocketImpl.java:392)
39 t(Socket.java:589)
40 sql.t(StandardSocketFactory.java:211)
41 sql.jdbc.MysqlIO.<init>(MysqlIO.java:301)
42 ... 20 more
43
44⼋⽉ 21, 2020 5:01:26 下午 sourcepool.BasicResourcePool
45警告: Having failed to acquire a resource, sourcepool.BasicResourcePool@52
0d0d4e is interrupting all Threads waiting on a resource to check out. Will try again in respon to new client requests.
46⼋⽉ 21, 2020 5:01:26 下午 sourcepool.BasicResourcePool
47警告: sourcepool.BasicResourcePool$ScatteredAcquireTask@634f6fcf -- Acquisition Attempt Failed Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximu ptions.jdbc4.CommunicationsException: Communications link failure
49
50 The last packet nt successfully to the rver was 0 milliconds ago. The driver has not received any packets from the rver.
51 wInstance(Unknown Source)
52 wInstance(DelegatingConstructorAccessorImpl.java:45)
53 at wInstance(Constructor.java:423)
54 sql.jdbc.Util.handleNewInstance(Util.java:425)
55 sql.ateCommunicationsException(SQLError.java:990)
56 sql.jdbc.MysqlIO.<init>(MysqlIO.java:342)
57 sql.Connect(ConnectionImpl.java:2197)
58 sql.tOneTryOnly(ConnectionImpl.java:2230)
59 sql.ateNewIO(ConnectionImpl.java:2025)
60 sql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
61 sql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
62 wInstance(Unknown Source)
63 wInstance(DelegatingConstructorAccessorImpl.java:45)
64 at wInstance(Constructor.java:423)
65 sql.jdbc.Util.handleNewInstance(Util.java:425)
66 sql.Instance(ConnectionImpl.java:386)
67 sql.t(NonRegisteringDriver.java:330)
68 hange.v2.Connection(DriverManagerDataSource.java:175)
69 hange.v2.PooledConnection(WrapperConnectionPoolDataSource.java:220)
july
70 hange.v2.PooledConnection(WrapperConnectionPoolDataSource.java:206)
71 hange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
72 sourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
73 sourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
74 sourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
75 sourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
76 hange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
77 Caud by: ConnectException: Connection refud: connect
78 t0(Native Method)
79 DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
80 AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
81 tToAddress(AbstractPlainSocketImpl.java:206)
82 t(AbstractPlainSocketImpl.java:188)
83 t(PlainSocketImpl.java:172)
84 t(SocksSocketImpl.java:392)
85 t(Socket.java:589)
86 sql.t(StandardSocketFactory.java:211)
87 sql.jdbc.MysqlIO.<init>(MysqlIO.java:301)
零基础学雅思88 ... 20 more
89
气门导管90⼋⽉ 21, 2020 5:01:26 下午 sourcepool.BasicResourcePool
91警告: sourcepool.BasicResourcePool$ScatteredAcquireTask@6c971fde -- Acquisition Attempt Failed Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maxim ptions.jdbc4.Communi
cationsException: Communications link failure
quantity的用法
93
94 The last packet nt successfully to the rver was 0 milliconds ago. The driver has not received any packets from the rver.
95 wInstance(Unknown Source)
96 wInstance(DelegatingConstructorAccessorImpl.java:45)
97 at wInstance(Constructor.java:423)
98 sql.jdbc.Util.handleNewInstance(Util.java:425)
99 sql.ateCommunicationsException(SQLError.java:990)
100 sql.jdbc.MysqlIO.<init>(MysqlIO.java:342)
101 sql.Connect(ConnectionImpl.java:2197)
102 sql.tOneTryOnly(ConnectionImpl.java:2230)
kmb
103 sql.ateNewIO(ConnectionImpl.java:2025)
104 sql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
105 sql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)clot怎么读
106 wInstance(Unknown Source)
107 wInstance(DelegatingConstructorAccessorImpl.java:45)
108 at wInstance(Constructor.java:423)
109 sql.jdbc.Util.handleNewInstance(Util.java:425)软件翻译工具
110 sql.Instance(ConnectionImpl.java:386)
111 sql.t(NonRegisteringDriver.java:330)
pw是什么意思
112 hange.v2.Connection(DriverManagerDataSource.java:175)
113 hange.v2.PooledConnection(WrapperConnectionPoolDataSource.java:220)
114 hange.v2.PooledConnection(WrapperConnectionPoolDataSource.java:206)
115 hange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
116 sourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
117 sourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
118 sourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
119 sourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
120 hange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
121 Caud by: ConnectException: Connection refud: connect
122 t0(Native Method)
123 DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
124 AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
125 tToAddress(AbstractPlainSocketImpl.java:206)
126 t(AbstractPlainSocketImpl.java:188)
127 t(PlainSocketImpl.java:172)
128 t(SocksSocketImpl.java:392)
129 t(Socket.java:589)
130 sql.t(StandardSocketFactory.java:211)
131 sql.jdbc.MysqlIO.<init>(MysqlIO.java:301)
132 ... 20 more
上⽹查了很多,
有的说是dao层xml条件参数值错误,仔细检查并没有,
有的说是⼀般有Illegal access: this web application instance has been stopped already. Could not load+....+The eventual following stack trace is caud by+.......这种类型的错误都是因为重新加载失败引起的;
检查各种属性名和参数名都没问题之后,最后打开服务才发现是mysql服务停⽌,打开就好,其实解决之后发现,报错的提⽰中含有jdbc⼏个关键字,不难发现是连接出现错误希望能给朋友们解决问题
总结,遇到bug不要急,先排除代码问题再看配置,再康康环境,慢慢来,冰冻三尺,⾮⼀⽇之寒