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

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

  • com.serotonin.timer.TimeSource

    Using latest CVS

  • Hacked together my own fix for the time being

    package com.serotonin.timer;
    public interface TimeSource {
    	long currentTimeMillis();
    package com.serotonin.timer;
    public class SystemTimeSource implements TimeSource {
    	public long currentTimeMillis() {
    		return System.currentTimeMillis();

    injected into seroUtils.jar

    jar uf seroUtils.jar com/serotonin/timer/

  • Weird. Modbus4J doesn't reference TimeSource AFAICT, and seroUtils is internally consistent, so i'm not sure how you would have gotten this error. Can you provide the full stack trace?

  • Caused by: java.lang.NoClassDefFoundError: com/serotonin/timer/TimeSource
    	at com.serotonin.modbus4j.ModbusMaster.getMessageControl(
    	at com.serotonin.modbus4j.serial.rtu.RtuMaster.init(
    Caused by: java.lang.ClassNotFoundException: com.serotonin.timer.TimeSource
    	at java.lang.ClassLoader.loadClass(
    	... 6 more

    From the class view provided by eclipse on MessageControl.class I can clearly see

    // Field descriptor #99 Lcom/serotonin/timer/TimeSource;
    private com.serotonin.timer.TimeSource timeSource;

    and its constructor

    39  aload_0 [this]
    40  new com.serotonin.timer.SystemTimeSource [11]
    43  dup
    44  invokespecial com.serotonin.timer.SystemTimeSource() [12]
    47  putfield com.serotonin.messaging.MessageControl.timeSource : com.serotonin.timer.TimeSource [13]

  • This is what you need:

    Attachment: download link