让WSO2 5.0.0尝试使用JDBC消息存储库实现存储和转发模式。
向目标端点发送消息会引发异常:
TID: [-1234] [] [2016-12-05 23:25:24,874] ERROR {org.apache.synapse.message.processor.impl.sampler.SamplingService} - Error occurred while executing the message {org.apache.synapse.message.processor.impl.sampler.SamplingService}
org.apache.synapse.SynapseException: Unexpected error during sending message out
at org.apache.synapse.core.axis2.Axis2Sender.handleException(Axis2Sender.java:257)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:84)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:55)
at org.apache.synapse.mediators.builtin.CallMediator.handleNonBlockingCall(CallMediator.java:221)
at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:99)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.message.processor.impl.sampler.SamplingService$1.run(SamplingService.java:211)
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.NullPointerException
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:538)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:78)
... 15 more
我相信我错过了一个重要的交通工具,Axis2或Synapse财产,但我无法找到哪一个。
存储和转发的序列为here。
我试图找出in the source codes可能导致NullPointerException的原因,但对我而言,定义httpMethod和messageType是没有意义的。
谢谢大家的提示
编辑: 根据评论,正在使用的Synapse源是here。
答案 0 :(得分:0)
您的留言处理器在哪里?理想情况下,您的消息处理器应使用调用介体调用后端服务。您能否尝试以下步骤。
<property name="OUT_ONLY" value="true" />
log4j.logger.httpclient.wire.header=DEBUG
获取有线日志
在log4j.properties文件中log4j.logger.httpclient.wire.content=DEBUG
并在此处发布,以便我可以分析并帮助您。