总结
昨日,遇到有个异常堆栈,由于只重点关注了最后的causeby,忽略了前面重要的异常信息(Encode esponse error),导致定位时间加长。
此次经历的教训是,观察异常堆栈不能急躁,要一层一层的往下看。这样才能更快定位错误。
附异常堆栈
com.jd.edi.utils.exception.runtime.ProcessorRunningException: Encode response error
at com.jd.lsb.edi.flow.camel.processor.exception.ExceptionProcessor.process(ExceptionProcessor.java:66)
at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.FatalFallbackErrorHandler.process(FatalFallbackErrorHandler.java:82)
at org.apache.camel.processor.RedeliveryErrorHandler.deliverToFailureProcessor(RedeliveryErrorHandler.java:1063)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:474)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
at com.jd.lsb.edi.flow.camel.processor.redirect.SubflowProcessor.processSync(SubflowProcessor.java:63)
at com.jd.lsb.edi.flow.camel.processor.redirect.SubflowProcessor.process(SubflowProcessor.java:50)
at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541)
at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506)
at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369)
at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:246)
at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:148)
at com.jd.lsb.edi.flow.camel.EdiProducerTemplate.request(EdiProducerTemplate.java:28)
at com.jd.lsb.edi.flow.camel.service.impl.CamelFlowEngineImpl.executeFlow(CamelFlowEngineImpl.java:450)
at com.jd.lsb.edi.service.provider.invoker.AbstractProviderInvoker.startFlow(AbstractProviderInvoker.java:119)
at com.jd.lsb.edi.service.http.provider.invoker.HttpProviderInvoker.executeProcess(HttpProviderInvoker.java:36)
at com.jd.lsb.edi.service.http.provider.invoker.HttpProviderInvoker.executeProcess(HttpProviderInvoker.java:14)
at com.jd.lsb.edi.service.provider.invoker.AbstractProviderInvoker.invoke(AbstractProviderInvoker.java:62)
at com.jd.lsb.edi.service.provider.invoker.AbstractServiceProvider.execute(AbstractServiceProvider.java:86)
at com.jd.lsb.edi.service.provider.publisher.AbstractInvokePublisher.executeServiceProvider(AbstractInvokePublisher.java:173)
at com.jd.lsb.edi.service.provider.publisher.AbstractInvokePublisher.invoke(AbstractInvokePublisher.java:74)
at com.jd.lsb.edi.service.http.provider.publisher.HttpServicePublisher.invoke(HttpServicePublisher.java:43)
at com.sun.proxy.$Proxy47.processHttp(Unknown Source)
at sun.reflect.GeneratedMethodAccessor829.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.jd.jsf.gd.filter.ProviderInvokeFilter.reflectInvoke(ProviderInvokeFilter.java:140)
at com.jd.jsf.gd.filter.ProviderInvokeFilter.invoke(ProviderInvokeFilter.java:100)
at com.jd.jsf.gd.filter.ProviderConcurrentsFilter.invoke(ProviderConcurrentsFilter.java:62)
at com.jd.jsf.gd.filter.ProviderTimeoutFilter.invoke(ProviderTimeoutFilter.java:39)
at com.jd.jsf.gd.filter.ProviderMethodCheckFilter.invoke(ProviderMethodCheckFilter.java:78)
at com.jd.jsf.gd.filter.ProviderInvokeLimitFilter.invoke(ProviderInvokeLimitFilter.java:54)
at com.jd.jsf.gd.filter.ProviderHttpGWFilter.invoke(ProviderHttpGWFilter.java:47)
at com.jd.jsf.gd.filter.ProviderGenericFilter.invoke(ProviderGenericFilter.java:118)
at com.jd.jsf.gd.filter.ProviderContextFilter.invoke(ProviderContextFilter.java:73)
at com.jd.jsf.gd.filter.ExceptionFilter.invoke(ExceptionFilter.java:49)
at com.jd.jsf.gd.filter.SystemTimeCheckFilter.invoke(SystemTimeCheckFilter.java:79)
at com.jd.jsf.gd.filter.FilterChain.invoke(FilterChain.java:275)
at com.jd.jsf.gd.server.ProviderProxyInvoker.invoke(ProviderProxyInvoker.java:67)
at com.jd.jsf.gd.server.JSFTask.doRun(JSFTask.java:123)
at com.jd.jsf.gd.server.BaseTask.run(BaseTask.java:27)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Encode response error
at com.jd.lsb.edi.component.jsf.JsfProducer.process(JsfProducer.java:98)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
... 56 more
Caused by: com.jd.jsf.gd.error.JSFCodecException: Encode response error
at com.jd.jsf.gd.codec.hessian.HessianCodec.encode(HessianCodec.java:92)
at com.jd.jsf.gd.protocol.JSFProtocol.encode(JSFProtocol.java:125)
at com.jd.jsf.gd.protocol.ProtocolUtil.encode(ProtocolUtil.java:47)
at com.jd.jsf.gd.server.JSFTask.doRun(JSFTask.java:148)
... 6 more
Caused by: java.lang.RuntimeException: Serialized class com.jd.eclp2.wms.rtw.domain.domains.RtwMainQuerySimpleResult must implement java.io.Serializable
Java field: private java.util.List com.jd.eclp2.wms.rtw.domain.common.Page.aaData
Java field: private com.jd.eclp2.wms.rtw.domain.common.Page com.jd.eclp2.wms.rtw.domain.response.RtwCommonPageResponse.pageResult
at com.jd.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:315)
at com.jd.com.caucho.hessian.io.JavaSerializer.writeInstance(JavaSerializer.java:263)
at com.jd.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:227)
at com.jd.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:408)
at com.jd.jsf.gd.codec.hessian.HessianCodec.encodeResponse(HessianCodec.java:175)
at com.jd.jsf.gd.codec.hessian.HessianCodec.encode(HessianCodec.java:84)
... 9 more
Caused by: java.lang.RuntimeException: Serialized class com.jd.eclp2.wms.rtw.domain.domains.RtwMainQuerySimpleResult must implement java.io.Serializable
Java field: private java.util.List com.jd.eclp2.wms.rtw.domain.common.Page.aaData
at com.jd.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:315)
at com.jd.com.caucho.hessian.io.JavaSerializer.writeInstance(JavaSerializer.java:263)
at com.jd.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:227)
at com.jd.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:408)
at com.jd.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:313)
... 14 more
Caused by: java.lang.IllegalStateException: Serialized class com.jd.eclp2.wms.rtw.domain.domains.RtwMainQuerySimpleResult must implement java.io.Serializable
at com.jd.com.caucho.hessian.io.SerializerFactory.getDefaultSerializer(SerializerFactory.java:269)
at com.jd.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:243)
at com.jd.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:406)
at com.jd.com.caucho.hessian.io.CollectionSerializer.writeObject(CollectionSerializer.java:102)
at com.jd.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:408)
at com.jd.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:313)
... 18 more
网友评论