NutzCN Logo
问答 停止应用时发生如下内存溢出错误,
发布于 2844天前 作者 qq_31cd2d9b 1896 次浏览 复制 上一个帖子 下一个帖子
标签:

严重: A child container failed during stop
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1175)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1587)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1576)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:587)
at java.lang.StringBuilder.append(StringBuilder.java:214)
at org.nutz.lang.stream.StringWriter.write(StringWriter.java:23)
at java.io.Writer.write(Writer.java:192)
at java.io.Writer.write(Writer.java:157)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:89)
at org.nutz.json.impl.JsonRenderImpl.array2Json(JsonRenderImpl.java:395)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:128)
at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
at org.nutz.json.impl.JsonRenderImpl.coll2Json(JsonRenderImpl.java:407)

三月 10, 2017 6:02:54 下午 org.apache.catalina.core.ContainerBase stopInternal
严重: A child container failed during stop
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1175)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:503)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:777)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:766)
at org.apache.catalina.startup.Catalina.start(Catalina.java:728)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1587)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1576)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during stop
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1182)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
... 6 more

三月 10, 2017 6:02:54 下午 org.apache.catalina.startup.Catalina stop
严重: Catalina.stop
org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:766)
at org.apache.catalina.startup.Catalina.start(Catalina.java:728)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:777)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
... 8 more
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:503)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
... 10 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during stop
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1182)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
... 12 more

8 回复

at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
是不是这里导致的内存溢出呢?

什么版本?


org.nutz
nutz
1.r.60

在这个错误之前,有这两个错误
严重: The web application [/iptv] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 10, 2017 5:27:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
严重: The web application [/iptv] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

是不是没贴全?看不出哪个地方调用toJson方法

C:\worksoft\apache-tomcat-7.0.70\bin\catalina.bat stop
Disconnected from the target VM, address: '127.0.0.1:4498', transport: 'socket'
Using CATALINA_BASE:   "C:\Users\Administrator\.IntelliJIdea14\system\tomcat\Unnamed_IptvWeb_2"
Using CATALINA_HOME:   "C:\worksoft\apache-tomcat-7.0.70"
Using CATALINA_TMPDIR: "C:\worksoft\apache-tomcat-7.0.70\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.7.0_79"
Using CLASSPATH:       "C:\worksoft\apache-tomcat-7.0.70\bin\bootstrap.jar;C:\worksoft\apache-tomcat-7.0.70\bin\tomcat-juli.jar"
三月 11, 2017 11:14:19 上午 org.apache.catalina.core.StandardServer await
信息: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
三月 11, 2017 11:14:19 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-apr-8080"]
三月 11, 2017 11:14:19 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-apr-8009"]
三月 11, 2017 11:14:19 上午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
2017-03-11 11:14:19,201 [localhost-startStop-2] INFO  [org.nutz.mvc.impl.NutLoading] - Nutz.Mvc[nutz] is deposing ...
2017-03-11 11:14:19,206 [localhost-startStop-2] INFO  [org.nutz.ioc.impl.NutIoc] - org.nutz.ioc.impl.NutIoc@2014515789 is closing. startup date [17-03-11 11:11:22.596]
2017-03-11 11:14:19,206 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'net_configService' ...
2017-03-11 11:14:19,206 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'net_configContoller' ...
2017-03-11 11:14:19,206 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'sysUserService' ...
2017-03-11 11:14:19,206 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'txREAD_COMMITTED' ...
2017-03-11 11:14:19,206 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'sysController' ...
2017-03-11 11:14:19,206 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'conf' ...
2017-03-11 11:14:19,207 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'dao' ...
2017-03-11 11:14:19,207 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object '$aop_syslog' ...
2017-03-11 11:14:19,207 [localhost-startStop-2] DEBUG [org.nutz.ioc.impl.ScopeContext] - Depose object 'dataSource' ...
2017-03-11 11:14:19,218 [localhost-startStop-2] INFO  [com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} closed
2017-03-11 11:14:19,219 [localhost-startStop-2] INFO  [org.nutz.ioc.impl.NutIoc] - org.nutz.ioc.impl.NutIoc@2014515789 is deposed. startup date [17-03-11 11:11:22.596]
2017-03-11 11:14:19,219 [localhost-startStop-2] INFO  [org.nutz.mvc.impl.NutLoading] - Nutz.Mvc[nutz] is down in 18ms
三月 11, 2017 11:14:19 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
严重: The web application [/iptv] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 11, 2017 11:14:19 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
严重: The web application [/iptv] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 11, 2017 11:14:52 上午 org.apache.catalina.core.ContainerBase stopInternal
严重: A child container failed during stop
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1175)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1587)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1576)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2367)
	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:587)
	at java.lang.StringBuilder.append(StringBuilder.java:214)
	at org.nutz.lang.stream.StringWriter.write(StringWriter.java:23)
	at java.io.Writer.write(Writer.java:113)
	at java.io.Writer.append(Writer.java:293)
	at org.nutz.json.impl.JsonRenderImpl.string2Json(JsonRenderImpl.java:338)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:96)
	at org.nutz.json.impl.JsonRenderImpl.array2Json(JsonRenderImpl.java:395)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:128)
	at org.nutz.json.impl.JsonRenderImpl.array2Json(JsonRenderImpl.java:395)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:128)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
	at org.nutz.json.impl.JsonRenderImpl.array2Json(JsonRenderImpl.java:395)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:128)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:171)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:317)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:310)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:132)

三月 11, 2017 11:14:52 上午 org.apache.catalina.core.ContainerBase stopInternal
严重: A child container failed during stop
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost]]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1175)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:503)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:777)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	at org.apache.catalina.startup.Catalina.stop(Catalina.java:766)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:728)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost]]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1587)
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1576)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during stop
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1182)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	... 6 more

三月 11, 2017 11:14:52 上午 org.apache.catalina.startup.Catalina stop
严重: Catalina.stop
org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[8005]]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
	at org.apache.catalina.startup.Catalina.stop(Catalina.java:766)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:728)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardService[Catalina]]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:777)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	... 8 more
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina]]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:503)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	... 10 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during stop
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1182)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	... 12 more

Disconnected from server

这个是所有的日志。因为是停止的时间报错,我打的断点没有进入调试。不知道是在哪里调用了toJson

在JsonRenderImpl的132行打断点

添加回复
请先登陆
回到顶部