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.
SeroUtils.jar ClassNotFoundException
-
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 { @Override 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(ModbusMaster.java:302) at com.serotonin.modbus4j.serial.rtu.RtuMaster.init(RtuMaster.java:48) Caused by: java.lang.ClassNotFoundException: com.serotonin.timer.TimeSource at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 6 moreFrom 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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login