Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » I2C(Not able to access jdk.dio libaray .Event i imported jdk.dio jar from my target defination.)
I2C [message #1792318] Mon, 16 July 2018 05:40 Go to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
Got this Error.
java.lang.UnsatisfiedLinkError: unsupported JNI version 0xFFFFFFFF required by /tmp/osgi/framework_storage/org.eclipse.osgi/bundles/58/1/.cp/lib/native/linux/x86_64/libdio.so[



I2CDevice slave = (I2CDevice) DeviceManager.open(new I2CDeviceConfig(1,0x23,7, 400000));//got error on this line.
			s_logger.info("open{}",slave.isOpen());
	               s_logger.info("data{}",slave.read());




here is console log.

java.lang.UnsatisfiedLinkError: unsupported JNI version 0xFFFFFFFF required by /tmp/osgi/framework_storage/org.eclipse.osgi/bundles/58/1/.cp/lib/native/linux/x86_64/libdio.so
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1837)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.oracle.dio.impl.Platform$1.run(Platform.java:41)
at com.oracle.dio.impl.Platform$1.run(Platform.java:38)
at java.security.AccessController.doPrivileged(Native Method)
at com.oracle.dio.impl.Platform.initialize(Platform.java:38)
at jdk.dio.DeviceManager.<clinit>(DeviceManager.java:130)
at org.eclipse.example.i2c.i2c.getPins(i2c.java:119)
at org.eclipse.example.i2c.i2c.acquirePins(i2c.java:102)
at org.eclipse.example.i2c.i2c.activate(i2c.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:235)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:260)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at java.lang.Thread.run(Thread.java:748)
Re: I2C [message #1792501 is a reply to message #1792318] Wed, 18 July 2018 18:01 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 279
Registered: July 2015
Location: Italy
Senior Member
Hi,
could you please provide some context about this issue?
For example about which version of Kura are you running, on which hardware, etc.

Thanks.

Best regards,
Matteo
Re: I2C [message #1792524 is a reply to message #1792501] Thu, 19 July 2018 05:26 Go to previous message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
Thanx for reply
I am using user_workspace_archive_2.1.0.

I have included jdk.dio in manifest dependency .

this is my mainifest file
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Hello word with logger
Bundle-SymbolicName: org.eclipse.kura.example.hello._osgi
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: org.eclipse.kura.example.hello._osgi
Service-Component: OSGI-INF/component.xml
Import-Package: jdk.dio;version="1.0.5",
jdk.dio.gpio;version="1.0.5",
jdk.dio.i2cbus;version="1.0.5",
org.osgi.service.component;version="1.2.0",
org.slf4j;version="1.7.21"
Require-Bundle: org.eclipse.kura.api;bundle-version="1.1.0"

I am able to used other classes like,DeviceConfig and GPIOPinConfig but only not able to used DeviceManger class it gives error like cloud not initialize class DeviceManger.And Running on Kura Emulator.

Traget hardware: Emulator.
Eclipse version:oxygen
Os:Ubuntu 16.04
jdk version:1.8


[Updated on: Fri, 20 July 2018 06:03]

Report message to a moderator

Previous Topic:BACnet protocol
Next Topic:Can Kura work on x86 based linux system?
Goto Forum:
  


Current Time: Tue Nov 13 00:30:45 GMT 2018

Powered by FUDForum. Page generated in 0.02595 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top