• Recent
    • Tags
    • Popular
    • Register
    • Login

    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

    A little help!!

    Modbus4J general discussion
    2
    14
    5.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      Jkhar
      last edited by

      Hi mlohbihler(again). I'm trying to use the Listener and Master test classes (for a TCP slave an master) that you mention before but when i execute both at the same time (first listener then master) i get this exeption:

      Exception in thread "main" java.lang.NoSuchMethodError: com.serotonin.io.messaging.TestableTransport.<init>(Ljava/io/InputStream;Ljava/io/OutputStream;)V
      at com.serotonin.modbus4j.ip.tcp.TcpSlave$TcpConnectionHandler.<init>(TcpSlave.java:82)
      at com.serotonin.modbus4j.ip.tcp.TcpSlave.start(TcpSlave.java:46)
      at servermodbus.Main.main(Main.java:34)

      in both classes.

      Could you advise me? What am i doing wrong?

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        Make sure seroUtils.jar is in your classpath.

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • J
          Jkhar
          last edited by

          Sorry it is not teh same in both in salve is:
          Exception in thread "main" java.lang.NoSuchMethodError: com.serotonin.io.messaging.TestableTransport.<init>(Ljava/io/InputStream;Ljava/io/OutputStream;)V
          at com.serotonin.modbus4j.ip.tcp.TcpSlave$TcpConnectionHandler.<init>(TcpSlave.java:82)
          at com.serotonin.modbus4j.ip.tcp.TcpSlave.start(TcpSlave.java:46)
          at servermodbus.Main.main(Main.java:34)
          Java Result: 1

          And in Master is:
          Exception in thread "main" java.lang.NoSuchMethodError: com.serotonin.io.messaging.StreamTransport.<init>(Ljava/io/InputStream;Ljava/io/OutputStream;)V
          at com.serotonin.modbus4j.ip.tcp.TcpMaster.openConnection(TcpMaster.java:113)
          at com.serotonin.modbus4j.ip.tcp.TcpMaster.init(TcpMaster.java:44)
          at otra.Main.main(Main.java:69)
          Java Result: 1

          Thanks for your help. :!: :!: :!: :)

          1 Reply Last reply Reply Quote 0
          • J
            Jkhar
            last edited by

            Yes i have it in my class path

            1 Reply Last reply Reply Quote 0
            • M
              mlohbihler
              last edited by

              Should be fine then. Other users have had the same message, and it was always due to not having seroUtils in the classpath. Maybe check that the jar file isn't corrupt.

              Best regards,
              Matthew

              1 Reply Last reply Reply Quote 0
              • J
                Jkhar
                last edited by

                I think that maybe in the TCPSlave class there is something like this
                transport = new TestableTransport(socket.getInputStream(), socket.getOutputStream());
                But in the TestableTransport class in the library seroUtils the class TestableTransport needs 3 parameters and the one that is missing is the thread Name or what do you think that it might be.

                Sorry if i bother you to much but i don't know waht to do

                1 Reply Last reply Reply Quote 0
                • J
                  Jkhar
                  last edited by

                  Or where can i download another version or the last update of seroUtils library??

                  1 Reply Last reply Reply Quote 0
                  • M
                    mlohbihler
                    last edited by

                    Hmm, it's true that things may have gotten out of sync over time. To make sure, i've uploaded a version 1.02 of modbus4j to sourceforge. Try getting those versions and see if things are better.

                    Best regards,
                    Matthew

                    1 Reply Last reply Reply Quote 0
                    • J
                      Jkhar
                      last edited by

                      Thanks, i will download the new version and check if it works fine. thanks again. :-)

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post