mdanish98 opened a new issue, #866:
URL: https://github.com/apache/plc4x/issues/866

   I am using 
[ModbusPal](https://plc4x.apache.org/users/getting-started/virtual-modbus.html) 
to create the Virtual modbus.
   
   I am using the endpoint URI as:
   
`plc4x:modbus-tcp://localhost:502?unitId=1&dataType=holding-register&addresses=1`
   
   Following is the screenshot of Modbus holding registers:
   
![image](https://user-images.githubusercontent.com/62088117/227714761-e6486993-f44a-4482-a7be-e76e5a94b49c.png)
   
   But when starting camel context it throws NullPointerException.
   ```
   java.lang.NullPointerException
       at 
org.apache.camel.component.plc4x.Plc4XConsumer.startUnTriggered(Plc4XConsumer.java:89)
       at 
org.apache.camel.component.plc4x.Plc4XConsumer.doStart(Plc4XConsumer.java:81)
       at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
   ```
   
   I debugged it and found the problem is with this line:
   ` for (Map.Entry<String, Object> tag : tags.entrySet()) {`
   
   Here **tags** is null, so basically I am not configuring the endpoint 
correctly.
   
   How can I write the endpoint correctly?
   
   
   
   
   
   
   
   


-- 
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: dev-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to