losevskiyfz opened a new issue, #337: URL: https://github.com/apache/plc4x-extras/issues/337
I want to write some data in self-deployed local Modbus server, but I cat't do it. I tried to search how to do this and found out docs, but I couldn't understand according it how to solve the problem. https://github.com/ottobackwards/plc4x-extras/blob/nifi-2-M2-initial-support/plc4j/integrations/apache-nifi/README.md 0) I have self-deployed Modbus server from Plc4x guide: https://plc4x.apache.org/plc4x/latest/users/getting-started/virtual-modbus.html. It works nice for reading data. 1)I upstream JSON to Plc4xSinkRecordProcessor looks like this:  2) That's my Plc4xSinkRecordProcessor configuration:  3) I use default configuration for JsonTreeReader  4) I got exception in NiFi. `2025-05-06 15:46:12,488 ERROR [Timer-Driven Process Thread-3] o.a.plc4x.nifi.Plc4xSinkRecordProcessor Plc4xSinkRecordProcessor[id=a5760875-0196-1000-945c-6849e22b844e] Processing failed org.apache.nifi.processor.exception.ProcessException: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.apache.plc4x.java.spi.messages.utils.PlcTagValueItem.getResponseCode()" because the return value of "java.util.LinkedHashMap.get(Object)" is null at org.apache.plc4x.nifi.Plc4xSinkRecordProcessor.lambda$onTrigger$1(Plc4xSinkRecordProcessor.java:168) at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2669) at org.apache.plc4x.nifi.Plc4xSinkRecordProcessor.onTrigger(Plc4xSinkRecordProcessor.java:117) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1272) at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:244) at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102) at org.apache.nifi.engine.FlowEngine.lambda$wrap$1(FlowEngine.java:105) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.apache.plc4x.java.spi.messages.utils.PlcTagValueItem.getResponseCode()" because the return value of "java.util.LinkedHashMap.get(Object)" is null at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) at org.apache.plc4x.nifi.Plc4xSinkRecordProcessor.lambda$onTrigger$1(Plc4xSinkRecordProcessor.java:135) ... 13 common frames omitted Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.plc4x.java.spi.messages.utils.PlcTagValueItem.getResponseCode()" because the return value of "java.util.LinkedHashMap.get(Object)" is null at org.apache.plc4x.java.spi.messages.DefaultPlcWriteRequest.getTagResponseCode(DefaultPlcWriteRequest.java:80) at org.apache.plc4x.java.spi.connection.AbstractPlcConnection.lambda$1(AbstractPlcConnection.java:253) at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684) at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662) at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200) at org.apache.plc4x.java.spi.connection.AbstractPlcConnection.write(AbstractPlcConnection.java:244) at org.apache.plc4x.java.spi.messages.DefaultPlcWriteRequest.execute(DefaultPlcWriteRequest.java:60) at org.apache.plc4x.java.utils.cache.LeasedPlcConnection$3$1.execute(LeasedPlcConnection.java:232) ... 14 common frames omitted` -- 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]
