<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[getting java.lang.UnsatisfiedLinkError when running as modbusmaster]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am experiencing problems running the following code:</p>
<pre><code>      ModbusFactory factory = new ModbusFactory();
      
      SerialParameters params = new SerialParameters();
      
      params.setCommPortId("/dev/ttyM0");
      params.setBaudRate(9600);
      params.setDataBits(8);
      params.setParity(0);
      params.setStopBits(1);
      
      RtuMaster master = (RtuMaster) factory.createRtuMaster(params);
      
      
    try {
        master.setTimeout(1000);
        master.init();
        
          List&lt;Integer&gt; slaves = master.scanForSlaveNodes();
          System.out.println("slaves: "+slaves);
     
    } catch (ModbusInitException ex) {
        Logger.getLogger(modbus.class.getName()).log(Level.SEVERE, null, ex);
    }
</code></pre>
<p dir="auto">when I run the above code, I get the following error:</p>
<p dir="auto">java -cp lib/ -jar HaystackClient.jar<br />
log4j:WARN No appenders could be found for logger (com.serotonin.io.serial.JsscSerialPortProxy).<br />
log4j:WARN Please initialize the log4j system properly.<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /root/.jssc/linux/libjSSC-2.8_armsf.so: /root/.jssc/linux/libjSSC-2.8_armsf.so: cannot open shared object file: No such file or directory<br />
at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br />
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)<br />
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)<br />
at java.lang.Runtime.load0(Runtime.java:809)<br />
at java.lang.System.load(System.java:1086)<br />
at jssc.SerialNativeInterface.&lt;clinit&gt;(SerialNativeInterface.java:172)<br />
at jssc.SerialPort.&lt;init&gt;(SerialPort.java:120)<br />
at com.serotonin.io.serial.JsscSerialPortProxy.openImpl(JsscSerialPortProxy.java:111)<br />
at com.serotonin.io.serial.SerialPortProxy.open(SerialPortProxy.java:80)<br />
at com.serotonin.io.serial.SerialUtils.openSerialPort(SerialUtils.java:95)<br />
at com.serotonin.modbus4j.serial.SerialMaster.init(SerialMaster.java:58)<br />
at com.serotonin.modbus4j.serial.rtu.RtuMaster.init(RtuMaster.java:45)<br />
at modbus.main(modbus.java:39)</p>
<p dir="auto">Two strange things:</p>
<p dir="auto">1: The file in the error message actually exists<br />
2: The processor is an ARMv7 Cortex-A8 which has hard float, so it doesn't make sense to load armsf lib.</p>
<p dir="auto">Any ideas would be greatly appreciated :-)</p>
]]></description><link>https://forum.mango-os.com/topic/1970/getting-java-lang-unsatisfiedlinkerror-when-running-as-modbusmaster</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 22:54:47 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1970.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Sep 2015 13:42:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to getting java.lang.UnsatisfiedLinkError when running as modbusmaster on Mon, 07 Sep 2015 16:04:19 GMT]]></title><description><![CDATA[<p dir="auto">you run on a linux system.  please confirm the serial com name is "/dev/ttyM0"?  right?<br />
and this should be a jssc environment  problem,pleause comfirm if you lose some jar lib</p>
]]></description><link>https://forum.mango-os.com/post/10311</link><guid isPermaLink="true">https://forum.mango-os.com/post/10311</guid><dc:creator><![CDATA[hussam]]></dc:creator><pubDate>Mon, 07 Sep 2015 16:04:19 GMT</pubDate></item></channel></rss>