A little help!!
-
Hi. Try looking at stuff in the src_test folder. There are a number of test programs in there which should give you some ideas.
-
Thanks thats what i was looking for, it's a great library.
-
Thank you!
-
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?
-
Make sure seroUtils.jar is in your classpath.
-
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: 1And 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: 1Thanks for your help. :!: :!: :!: :)
-
Yes i have it in my class path
-
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.
-
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
-
Or where can i download another version or the last update of seroUtils library??
-
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.
-
Thanks, i will download the new version and check if it works fine. thanks again. :-)