ppalaga opened a new issue #3442:
URL: https://github.com/apache/camel-quarkus/issues/3442
This is what happens:
```
2022-01-07 12:25:38,165 ERROR [org.apa.cam.pro.err.DefaultErrorHandler]
(TcpSocketConsumerRunnable[mllp://localhost:45733] - /127.0.0.1:43118 =>
/127.0.0.1:45733) Failed delivery for (MessageId:
8D301D6472BDDF3-0000000000000001 on ExchangeId:
8D301D6472BDDF3-0000000000000001). Exhausted after delivery attempt: 1 caught:
java.lang.NullPointerException: Cannot invoke
"java.lang.Boolean.booleanValue()" because
"org.apache.camel.component.mllp.MllpComponent.logPhi" is null
Message History (complete message history is disabled)
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor
Elapsed (ms)
[route1 ] [route1 ]
[from[mllp://localhost:45733?validatePayload=true]
] [ 4]
...
[route1 ] [convertBodyTo1 ] [convertBodyTo[java.lang.String]
] [ 0]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
: java.lang.NullPointerException: Cannot invoke
"java.lang.Boolean.booleanValue()" because
"org.apache.camel.component.mllp.MllpComponent.logPhi" is null
at
org.apache.camel.component.mllp.MllpTcpServerConsumer.processMessage(MllpTcpServerConsumer.java:258)
at
org.apache.camel.component.mllp.internal.TcpSocketConsumerRunnable.run(TcpSocketConsumerRunnable.java:142)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
```
There is a couple of additional fixes in MLLP in Camel main branch that fix
this, but they also substantially change the way the component is configured,
so I think it would be less intrusive for the end users to workaround this in
Camel Quarkus 2.2.1 by adding something like the following:
```
@ApplicationScoped
public class MllpComponentInitializer {
public void onComponentAdd(@Observes ComponentAddEvent event) {
if (event.getComponent() instanceof MllpComponent) {
MllpComponent.setLogPhi(MllpComponent.isLogPhi());
}
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]