Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kura-dev] NoClassDefFoundError on Kura 1.1.0 using Modbus example

Hello Alessandro,

What hardware are you using to run Kura (Raspberry Pi, BeagleBone, etc.)? It appears that a native library is not loading. Can you also check if you are seeing errors in “/var/log/kura-console.log”?

Thanks,
--Dave

> On Jan 13, 2015, at 3:41 AM, Alessandro Da Rugna <alessandro.darugna@xxxxxxxxx> wrote:
> 
> I am trying to connect to a Modbus device using a serial connection on
> Kura 1.1.0 with modbus bundle.
> My bundle runs fine on the emulator and the Modbus hardware responds.
> When deploying my bundle in a running instance of Kura I get the
> following `NoClassDefFoundError`.
> I checked the modbus example provided in
> kura/examples/org.eclipse.kura.demo.modbus and I get the same error.
> To run the example as I need I changed 'isTCP' variable on line 30 to
> false and added two properties
> prop.setProperty("transmissionMode", "RTU");
> prop.setProperty("respTimeout", "700");
> in the modbus properties on line 218.
> The connection is not instantiated and I get the same error.
> Which import am I missing? I can't figure it out since it works in the emulator.
> 
> org.eclipse.kura.protocol.modbus.ModbusProtocolException: Generic
> Error - CONNECTION_FAILURE: {1} {2} {3} {4} {5} null
> at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice$SerialCommunicate.<init>(ModbusProtocolDevice.java:377)
> at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice.configureConnection(ModbusProtocolDevice.java:233)
> at org.eclipse.kura.demo.modbus.ModbusExample.configureDevice(ModbusExample.java:149)
> at org.eclipse.kura.demo.modbus.ModbusExample.doModbusLoop(ModbusExample.java:110)
> at org.eclipse.kura.demo.modbus.ModbusExample.access$0(ModbusExample.java:105)
> at org.eclipse.kura.demo.modbus.ModbusExample$1.run(ModbusExample.java:56)
> at java.lang.Thread.run(Thread.java:724)
> Caused by: java.io.IOException: java.lang.NoClassDefFoundError: Could
> not initialize class javax.comm.CommPortIdentifier
> at org.eclipse.kura.core.comm.CommConnectionFactory.createConnection(CommConnectionFactory.java:62)
> at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice$SerialCommunicate.<init>(ModbusProtocolDevice.java:375)
> ... 6 more
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> javax.comm.CommPortIdentifier
> at org.eclipse.kura.core.comm.CommConnectionImpl.<init>(CommConnectionImpl.java:85)
> at org.eclipse.kura.core.comm.CommConnectionFactory.createConnection(CommConnectionFactory.java:59)
> ... 7 more
> 
> Thank you,
> 
>  Alessandro
> _______________________________________________
> kura-dev mailing list
> kura-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/kura-dev


Back to the top