You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/01/07 11:34:30 UTC
[GitHub] [camel-quarkus] ppalaga opened a new issue #3442: MllpTest.invalidMessage fails with Camel 3.11.5 in 2.2.x branch
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org