fastjson转json对象docker环境老是偶发性出问题,请问有没有遇到相同问题的

江小鱼NO1 JAVA开发  2017-03-22 04:40:23
[2017-03-22 16:01:05.707][INFO][ajp-nio-8009-exec-6][hwsh][c.s.s.d.s.d.c.s.DsgConfigServiceImpl:542] resultJson is {
"message": "success",
"data":
{ "languages": [ 1, 2, 3 ], "minCheckSize": 5000, "enabled": true, "accuracy": 2 }
,
"responseCode": 200
}
[2017-03-22 16:01:05.707][INFO][ajp-nio-8009-exec-6][hwsh][c.s.s.d.s.d.c.s.DsgConfigServiceImpl:548] DsgConfigServiceImpl---0 getOCRConfig is ***
{"languages":[1,2,3],"minCheckSize":5000,"accuracy":2,"enabled":true}
***
[2017-03-22 16:01:05.712][ERROR][ajp-nio-8009-exec-6][hwsh][c.s.s.d.s.d.c.s.DsgConfigServiceImpl:554] DsgConfigServiceImpl---0 getOCRConfig error
java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to com.skyguard.sps.dlp.thrift.mc_common.OCRConfig
at com.skyguard.sps.dlp.server.device.config.service.DsgConfigServiceImpl$$Lambda$12/135413088.apply(Unknown Source) ~[na:na]
at com.skyguard.sps.dlp.server.device.config.service.DsgConfigServiceImpl.getDlpOCRConfigFromMC(DsgConfigServiceImpl.java:549) [dlp-server-1.0.jar:na]
at com.skyguard.sps.dlp.server.device.config.service.DsgConfigServiceImpl.getDlpOCRConfig(DsgConfigServiceImpl.java:532) [dlp-server-1.0.jar:na]
at sun.reflect.GeneratedMethodAccessor817.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.7.RELEASE.jar:na]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.7.RELEASE.jar:na]
at com.sun.proxy.$Proxy133.getDlpOCRConfig(Unknown Source) [na:na]
at sun.reflect.GeneratedMethodAccessor816.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at com.skyguard.sps.base.utils.facade.BaseFacadeAdapterInvocationHandler$MethodInfo.invoke(BaseFacadeAdapterInvocationHandler.java:39) [base-utils-1.0.jar:na]
at com.skyguard.sps.base.utils.facade.BaseFacadeHandler.invoke(BaseFacadeHandler.java:29) [base-utils-1.0.jar:na]
at com.sun.proxy.$Proxy135.getDlpOCRConfig(Unknown Source) [na:na]
at com.skyguard.sps.webmanager.dlp.device.config.controller.DsgConfigController.getDlpOCRConfig(DsgConfigController.java:149) [DsgConfigController.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) [spring-web-4.1.7.RELEASE.jar:na]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) [spring-web-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) [spring-webmvc-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) [spring-webmvc-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) [spring-webmvc-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) [spring-webmvc-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) [spring-webmvc-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) [spring-webmvc-4.1.7.RELEASE.jar:na]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) [spring-webmvc-4.1.7.RELEASE.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:na]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) [spring-webmvc-4.1.7.RELEASE.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.24]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.24]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.24]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.24]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.24]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.24]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.24]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.24]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.24]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:8.0.24]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.24]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.24]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617) [catalina.jar:8.0.24]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.24]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [catalina.jar:8.0.24]
at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:844) [tomcat-coyote.jar:8.0.24]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-coyote.jar:8.0.24]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527) [tomcat-coyote.jar:8.0.24]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484) [tomcat-coyote.jar:8.0.24]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.24]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
...全文
93 点赞 收藏 2
写回复
2 条回复
江小鱼NO1 2017年03月23日
找到原因了,是fastjson jar包的问题,版本有问题用1.2.6。不过还是太诡异,内网测试环境没有问题,外网docker环境偶尔出问题。日了
回复 点赞
Defonds 2017年03月23日
这个跟 docker 有关系? 本地 linux 服务器部署 ok?
回复 点赞
发动态
发帖子
Web 开发
创建于2007-09-28

5.2w+

社区成员

34.1w+

社区内容

Java Web 开发
社区公告
暂无公告