码迷,mamicode.com
首页 > Web开发 > 详细

fastjson 调用JSONObject.toJSON(),如果是解析泛型对象会报OutOfMemoryError错误

时间:2020-01-09 18:50:59      阅读:512      评论:0      收藏:0      [点我收藏+]

标签:dap   service   direct   obj   mit   viso   with   ogg   nes   

fastjson 调用JSONObject.toJSON(),如果是解析泛型对象会报OutOfMemoryError错误

2020-01-09 17:03:49.831 [http-nio-8062-exec-5] ERROR [org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:181)] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: GC overhead limit exceeded] with root cause
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.lang.reflect.Field.copy(Field.java:150) ~[?:1.8.0_121]
at java.lang.reflect.ReflectAccess.copyField(ReflectAccess.java:144) ~[?:1.8.0_121]
at sun.reflect.ReflectionFactory.copyField(ReflectionFactory.java:323) ~[?:1.8.0_121]
at java.lang.Class.copyFields(Class.java:3115) ~[?:1.8.0_121]
at java.lang.Class.getDeclaredFields(Class.java:1916) ~[?:1.8.0_121]
at com.alibaba.fastjson.parser.ParserConfig.getField0(ParserConfig.java:562) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.parser.ParserConfig.getField(ParserConfig.java:551) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.util.TypeUtils.computeGetters(TypeUtils.java:988) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.util.TypeUtils.computeGetters(TypeUtils.java:900) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:684) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:672) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:672) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:672) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:618) ~[fastjson-1.1.41.jar!/:?]
at com.alibaba.fastjson.JSON.toJSON(JSON.java:690) ~[fastjson-1.1.41.jar!/:?]
2020-01-09 17:09:23.075 [DiscoveryClient-2] ERROR [com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:67)] task supervisor timed out
java.util.concurrent.TimeoutException: null
at java.util.concurrent.FutureTask.get(FutureTask.java:205) ~[?:1.8.0_121]
at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:63) [eureka-client-1.6.2.jar!/:1.6.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

fastjson 调用JSONObject.toJSON(),如果是解析泛型对象会报OutOfMemoryError错误

标签:dap   service   direct   obj   mit   viso   with   ogg   nes   

原文地址:https://www.cnblogs.com/junge8618/p/12172724.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!