You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Ivo Koga <iv...@gmail.com> on 2008/09/13 20:52:51 UTC
Using Felix with JNI
Hi all,
I'm trying to use Felix with JNI, but I'm in trouble.
I use a third-party jar with the class that links to the native lib called
RawSocket.class.
The manifest of my bundle is of the form:
Bundle-Activator: br.unifacs.nuperc.ice.osgi.nativeping.NativePingBundle
Bundle-Classpath: .
Import-Package: -- lot of imports --
Bundle-Name: Native Ping Bundle
Bundle-NativeCode: lib/rocksaw.dll;osname=Windows XP;processor=x86
-------
And I get my bundle installed, but when I try to instantiate the class that
uses the .dll I got the following error:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no
rocksaw in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.savarese.rocksaw.net.RawSocket.<clinit>(RawSocket.java:79)
at br.unifacs.nuperc.ice.osgi.nativeping.Ping.<init>(Ping.java:68)
at br.unifacs.nuperc.ice.osgi.nativeping.Ping.makePing(Ping.java:173)
at
br.unifacs.nuperc.ice.osgi.nativeping.DynamicLineChartBase$DataGenerator.actionPerformed(DynamicLineChartBase.java:97)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Can anyone help me?
Re: Using Felix with JNI
Posted by Ivo Koga <iv...@gmail.com>.
Ok Richard,
It's not self-contained, but I'll try to make it like that to try to solve
this problem and I'll send u.
Thanks in advance for your help.
regards,
Ivo
On Mon, Sep 15, 2008 at 10:36 AM, Richard S. Hall <he...@ungoverned.org>wrote:
> Seems strange, since this looks right...assuming that the DLL is actually
> in that location in your bundle JAR file.
>
> If this bundle is self-contained and can easily demonstrate the issue, you
> can email to me off the list and I can try to check it out.
>
>
> -> richard
>
> Ivo Koga wrote:
>
>> Hi Richard,
>> Unfortunately it didn't solve my problem :-(
>>
>> regards,
>>
>> Ivo
>>
>> On Sun, Sep 14, 2008 at 10:21 PM, Richard S. Hall <heavy@ungoverned.org
>> >wrote:
>>
>>
>>
>>> Just a guess...try putting quotes around "Windows XP" or use
>>> WindowsXP...see page 95 in the R4.1 spec...
>>>
>>> -> richard
>>>
>>>
>>> Ivo Koga wrote:
>>>
>>>
>>>
>>>> Hi all,
>>>> I'm trying to use Felix with JNI, but I'm in trouble.
>>>>
>>>> I use a third-party jar with the class that links to the native lib
>>>> called
>>>> RawSocket.class.
>>>>
>>>> The manifest of my bundle is of the form:
>>>>
>>>> Bundle-Activator: br.unifacs.nuperc.ice.osgi.nativeping.NativePingBundle
>>>> Bundle-Classpath: .
>>>> Import-Package: -- lot of imports --
>>>> Bundle-Name: Native Ping Bundle
>>>> Bundle-NativeCode: lib/rocksaw.dll;osname=Windows XP;processor=x86
>>>> -------
>>>>
>>>> And I get my bundle installed, but when I try to instantiate the class
>>>> that
>>>> uses the .dll I got the following error:
>>>>
>>>> Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
>>>> no
>>>> rocksaw in java.library.path
>>>> at java.lang.ClassLoader.loadLibrary(Unknown Source)
>>>> at java.lang.Runtime.loadLibrary0(Unknown Source)
>>>> at java.lang.System.loadLibrary(Unknown Source)
>>>> at org.savarese.rocksaw.net.RawSocket.<clinit>(RawSocket.java:79)
>>>> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.<init>(Ping.java:68)
>>>> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.makePing(Ping.java:173)
>>>> at
>>>>
>>>>
>>>> br.unifacs.nuperc.ice.osgi.nativeping.DynamicLineChartBase$DataGenerator.actionPerformed(DynamicLineChartBase.java:97)
>>>> at javax.swing.Timer.fireActionPerformed(Unknown Source)
>>>> at javax.swing.Timer$DoPostEvent.run(Unknown Source)
>>>> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
>>>> at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>> at java.awt.EventDispatchThread.run(Unknown Source)
>>>>
>>>> Can anyone help me?
>>>>
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: Using Felix with JNI
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Seems strange, since this looks right...assuming that the DLL is
actually in that location in your bundle JAR file.
If this bundle is self-contained and can easily demonstrate the issue,
you can email to me off the list and I can try to check it out.
-> richard
Ivo Koga wrote:
> Hi Richard,
> Unfortunately it didn't solve my problem :-(
>
> regards,
>
> Ivo
>
> On Sun, Sep 14, 2008 at 10:21 PM, Richard S. Hall <he...@ungoverned.org>wrote:
>
>
>> Just a guess...try putting quotes around "Windows XP" or use
>> WindowsXP...see page 95 in the R4.1 spec...
>>
>> -> richard
>>
>>
>> Ivo Koga wrote:
>>
>>
>>> Hi all,
>>> I'm trying to use Felix with JNI, but I'm in trouble.
>>>
>>> I use a third-party jar with the class that links to the native lib called
>>> RawSocket.class.
>>>
>>> The manifest of my bundle is of the form:
>>>
>>> Bundle-Activator: br.unifacs.nuperc.ice.osgi.nativeping.NativePingBundle
>>> Bundle-Classpath: .
>>> Import-Package: -- lot of imports --
>>> Bundle-Name: Native Ping Bundle
>>> Bundle-NativeCode: lib/rocksaw.dll;osname=Windows XP;processor=x86
>>> -------
>>>
>>> And I get my bundle installed, but when I try to instantiate the class
>>> that
>>> uses the .dll I got the following error:
>>>
>>> Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no
>>> rocksaw in java.library.path
>>> at java.lang.ClassLoader.loadLibrary(Unknown Source)
>>> at java.lang.Runtime.loadLibrary0(Unknown Source)
>>> at java.lang.System.loadLibrary(Unknown Source)
>>> at org.savarese.rocksaw.net.RawSocket.<clinit>(RawSocket.java:79)
>>> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.<init>(Ping.java:68)
>>> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.makePing(Ping.java:173)
>>> at
>>>
>>> br.unifacs.nuperc.ice.osgi.nativeping.DynamicLineChartBase$DataGenerator.actionPerformed(DynamicLineChartBase.java:97)
>>> at javax.swing.Timer.fireActionPerformed(Unknown Source)
>>> at javax.swing.Timer$DoPostEvent.run(Unknown Source)
>>> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
>>> at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>>> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>>> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>> at java.awt.EventDispatchThread.run(Unknown Source)
>>>
>>> Can anyone help me?
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Using Felix with JNI
Posted by Ivo Koga <iv...@gmail.com>.
Hi Richard,
Unfortunately it didn't solve my problem :-(
regards,
Ivo
On Sun, Sep 14, 2008 at 10:21 PM, Richard S. Hall <he...@ungoverned.org>wrote:
> Just a guess...try putting quotes around "Windows XP" or use
> WindowsXP...see page 95 in the R4.1 spec...
>
> -> richard
>
>
> Ivo Koga wrote:
>
>> Hi all,
>> I'm trying to use Felix with JNI, but I'm in trouble.
>>
>> I use a third-party jar with the class that links to the native lib called
>> RawSocket.class.
>>
>> The manifest of my bundle is of the form:
>>
>> Bundle-Activator: br.unifacs.nuperc.ice.osgi.nativeping.NativePingBundle
>> Bundle-Classpath: .
>> Import-Package: -- lot of imports --
>> Bundle-Name: Native Ping Bundle
>> Bundle-NativeCode: lib/rocksaw.dll;osname=Windows XP;processor=x86
>> -------
>>
>> And I get my bundle installed, but when I try to instantiate the class
>> that
>> uses the .dll I got the following error:
>>
>> Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no
>> rocksaw in java.library.path
>> at java.lang.ClassLoader.loadLibrary(Unknown Source)
>> at java.lang.Runtime.loadLibrary0(Unknown Source)
>> at java.lang.System.loadLibrary(Unknown Source)
>> at org.savarese.rocksaw.net.RawSocket.<clinit>(RawSocket.java:79)
>> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.<init>(Ping.java:68)
>> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.makePing(Ping.java:173)
>> at
>>
>> br.unifacs.nuperc.ice.osgi.nativeping.DynamicLineChartBase$DataGenerator.actionPerformed(DynamicLineChartBase.java:97)
>> at javax.swing.Timer.fireActionPerformed(Unknown Source)
>> at javax.swing.Timer$DoPostEvent.run(Unknown Source)
>> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
>> at java.awt.EventQueue.dispatchEvent(Unknown Source)
>> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>> at java.awt.EventDispatchThread.run(Unknown Source)
>>
>> Can anyone help me?
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: Using Felix with JNI
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Just a guess...try putting quotes around "Windows XP" or use
WindowsXP...see page 95 in the R4.1 spec...
-> richard
Ivo Koga wrote:
> Hi all,
> I'm trying to use Felix with JNI, but I'm in trouble.
>
> I use a third-party jar with the class that links to the native lib called
> RawSocket.class.
>
> The manifest of my bundle is of the form:
>
> Bundle-Activator: br.unifacs.nuperc.ice.osgi.nativeping.NativePingBundle
> Bundle-Classpath: .
> Import-Package: -- lot of imports --
> Bundle-Name: Native Ping Bundle
> Bundle-NativeCode: lib/rocksaw.dll;osname=Windows XP;processor=x86
> -------
>
> And I get my bundle installed, but when I try to instantiate the class that
> uses the .dll I got the following error:
>
> Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no
> rocksaw in java.library.path
> at java.lang.ClassLoader.loadLibrary(Unknown Source)
> at java.lang.Runtime.loadLibrary0(Unknown Source)
> at java.lang.System.loadLibrary(Unknown Source)
> at org.savarese.rocksaw.net.RawSocket.<clinit>(RawSocket.java:79)
> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.<init>(Ping.java:68)
> at br.unifacs.nuperc.ice.osgi.nativeping.Ping.makePing(Ping.java:173)
> at
> br.unifacs.nuperc.ice.osgi.nativeping.DynamicLineChartBase$DataGenerator.actionPerformed(DynamicLineChartBase.java:97)
> at javax.swing.Timer.fireActionPerformed(Unknown Source)
> at javax.swing.Timer$DoPostEvent.run(Unknown Source)
> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
>
> Can anyone help me?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org