fastjson 调用JSONObject.toJSON(),如果是解析泛型对象会报OutOfMemoryError错误
作者:互联网
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,java,1.1,会报,jar,JSON,JSONObject,com 来源: https://www.cnblogs.com/junge8618/p/12172724.html