This issue was on j2mod-1.06. Found it solved in j2mod-2.3.3
I have the same issue. I connected my TCPMasterConnection to the modbus TCP emulator (modsim32). If m_Transaction.setReconnecting(false); then m_Transaction.execute() throw java.lang.NullPointerException at com.ghgande.j2mod.modbus.io.ModbusTCPTransport.writeMessage(ModbusTCPTransport.java:151) at com.ghgande.j2mod.modbus.io.ModbusTCPTransaction.execute(ModbusTCPTransaction.java:218) The higher frequency of requests (lower delays in Thread.sleep() inside loop) - the fasters NullPointerException appears....
I have the same issue. I connected my TCPMasterConnection to the modbus TCP emulator (modsim32). If m_Transaction.setReconnecting(false); then m_Transaction.execute() throw java.lang.NullPointerException at com.ghgande.j2mod.modbus.io.ModbusTCPTransport.writeMessage(ModbusTCPTransport.java:151) at com.ghgande.j2mod.modbus.io.ModbusTCPTransaction.execute(ModbusTCPTransaction.java:218) The higher frequency of requests (lower delays in Thread.sleep() inside loop) - the fasters NullPointerException appears....
I have the same issue. I connected my TCPMasterConnection to the modbus TCP emulator (modsim32). If m_Transaction.setReconnecting(false); then m_Transaction.execute() throw java.lang.NullPointerException at com.ghgande.j2mod.modbus.io.ModbusTCPTransport.writeMessage(ModbusTCPTransport.java:151) at com.ghgande.j2mod.modbus.io.ModbusTCPTransaction.execute(ModbusTCPTransaction.java:218) The higher frequency of requests (lower delays in Thread.sleep() inside loop) - the fasters NullPointerException appears....