• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. kelden

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    K
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    kelden

    @kelden

    0
    Reputation
    516
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    kelden Unfollow Follow

    Latest posts made by kelden

    • StreamTransport null pointer exception

      I have been trying to implement a RTU slave application, I used the ListenerTest as a start with the necessary modifications to make it create a RTU slave instead of the TCP slave. However when I try to run it I get a NullPointerException at the SteamTransporter.

      
      run:
      Stable Library
      =========================================
      Native lib Version = RXTX-2.1-7
      Java lib Version   = RXTX-2.1-7
      com.serotonin.modbus4j.exception.ModbusInitException: java.lang.NullPointerException
              at com.serotonin.modbus4j.serial.SerialSlave.start(SerialSlave.java:51)
              at com.serotonin.modbus4j.serial.rtu.RtuSlave.start(RtuSlave.java:40)
              at kiwi.main$1.run(main.java:46)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
              at com.serotonin.messaging.StreamTransport.start(StreamTransport.java:32)
              at com.serotonin.modbus4j.serial.SerialSlave.start(SerialSlave.java:48)
              ... 3 more
      
      

      I looked through the examples but couldn't find any that were very relevant except the listener one. Google didn't really turn up anything useful either. When I looked closer at the code I figured it might be something up with the name being passed to StreamTransport and fetched the thread and got it's name and passed that as a variable instead. That didn't make any difference though.

      Thanks in advance, hope I didn't miss anything painfully obvious :)

      posted in Modbus4J general discussion
      K
      kelden
    • RE: StreamTransport null pointer exception

      I have been trying to implement a RTU slave application, I used the ListenerTest as a start with the necessary modifications to make it create a RTU slave instead of the TCP slave. However when I try to run it I get a NullPointerException at the SteamTransporter.

      
      run:
      Stable Library
      =========================================
      Native lib Version = RXTX-2.1-7
      Java lib Version   = RXTX-2.1-7
      com.serotonin.modbus4j.exception.ModbusInitException: java.lang.NullPointerException
              at com.serotonin.modbus4j.serial.SerialSlave.start(SerialSlave.java:51)
              at com.serotonin.modbus4j.serial.rtu.RtuSlave.start(RtuSlave.java:40)
              at kiwi.main$1.run(main.java:46)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
              at com.serotonin.messaging.StreamTransport.start(StreamTransport.java:32)
              at com.serotonin.modbus4j.serial.SerialSlave.start(SerialSlave.java:48)
              ... 3 more
      
      

      I looked through the examples but couldn't find any that were very relevant except the listener one. Google didn't really turn up anything useful either. When I looked closer at the code I figured it might be something up with the name being passed to StreamTransport and fetched the thread and got it's name and passed that as a variable instead. That didn't make any difference though.

      Thanks in advance, hope I didn't miss anything painfully obvious :)

      posted in Modbus4J general discussion
      K
      kelden