wso2 / micro-integrator

The cloud-native configuration driven runtime that helps developers implement composite microservices.
https://wso2.com/integration/
Apache License 2.0
202 stars 218 forks source link

NullPointerException is caused when calling the fault sequence from the message processor. #3350

Closed veneerac closed 3 months ago

veneerac commented 4 months ago

When we call the endpoint using the ForwardingProcessor if the endpoint fails, it does not enter the fault sequence, and the message processor never retries the endpoint occurring the NullPointerException.

Error

[2024-05-29 13:25:20,675] ERROR {ForwardingService} - BlockingMessageSender of message processor [NewIncidentDCMessageProcessor] failed to forward message to endpoint NewIncidentDCcoreConsumerEP [2024-05-29 13:25:20,676] ERROR {ForwardingService} - Message processor [NewIncidentDCMessageProcessor] failed to send the message to client java.lang.NullPointerException at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.sendThroughFaultSeq(ForwardingService.java:798) at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.handleFailedInvocations(ForwardingService.java:696) at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.tryToDispatchToEndpoint(ForwardingService.java:684) at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.dispatch(ForwardingService.java:551) at org.apache.synapse.message.processor.impl.forwarder.ForwardingService.execute(ForwardingService.java:252) at org.wso2.micro.integrator.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:105) at org.wso2.micro.integrator.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:63) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)

arunans23 commented 3 months ago

Fixed with https://github.com/wso2/wso2-synapse/pull/1812, https://github.com/wso2/wso2-synapse/pull/1710