You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org> on 2010/05/20 15:21:05 UTC

[jira] Created: (FELIX-2350) Bundle inner jar cannot load libraries

Bundle inner jar cannot load libraries
--------------------------------------

                 Key: FELIX-2350
                 URL: https://issues.apache.org/jira/browse/FELIX-2350
             Project: Felix
          Issue Type: Bug
          Components: Karaf
    Affects Versions: karaf-1.4.0
         Environment: Windows XP
            Reporter: Jean-Philippe CLEMENT


I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.

The bundle archive contains (first level):
 com
 META-INF
 OSGI-INF
 X
 Y
 J

The bundle manifest file contains (not complete):
 Bundle-ClassPath: .,J
 Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86

In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
	...

However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.

Looks like it is a bug.

(*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871835#action_12871835 ] 

Jean-Philippe CLEMENT commented on FELIX-2350:
----------------------------------------------

"The attached bundle resolves & starts fine for me in Equinox and Felix 2.0.5."

Important: please note that you have to use this bundle with a Blueprint compliant implementation => else nothing will start (as there is no explicit bundle activator) and no bug will be seen ;)

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869684#action_12869684 ] 

Jean-Philippe CLEMENT edited comment on FELIX-2350 at 5/21/10 3:40 AM:
-----------------------------------------------------------------------

I'm using blueprint... don't think it is yet possible with equinox.

The worst thing is even if the dll is already loaded within the direct java bundle code, the library loading fails in the jar (J) call.

      was (Author: jeanphi):
    I'm using blueprint... don't think it is possible yet with equinox.

The worst thing is event if the dll is already loaded within the direct java bundle code, the library loading fails in the jar (J) call.
  
> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869684#action_12869684 ] 

Jean-Philippe CLEMENT commented on FELIX-2350:
----------------------------------------------

I'm using blueprint... don't think it is possible yet with equinox.

The worst thing is event if the dll is already loaded within the direct java bundle code, the library loading fails in the jar (J) call.

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Philippe CLEMENT updated FELIX-2350:
-----------------------------------------

    Attachment: bluestuff-1.0.0.jar

Here is a very basic bundle example. I wrote it from scratch so I'm not too sure it may work properly. Anyway it reproduces the problem.

The test bundle is bluestuff-1.0.0.jar
Starting the bundle uses the class WiiUseApiManager inside the inner wiiusej.jar
WiiUseApiManager uses WiiUseApi (still inside the inner wiiusej.jar)
On WiiUseApi class loading a System.loadLibrary("WiiUseJ") is performed
Which causes the exception:
Caused by: java.lang.UnsatisfiedLinkError: no WiiuseJ in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)

Hope this helps...

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-2350:
-----------------------------------

    Affects Version/s:     (was: karaf-1.4.0)
          Component/s: Framework
                           (was: Karaf)

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870077#action_12870077 ] 

Richard S. Hall edited comment on FELIX-2350 at 5/21/10 2:59 PM:
-----------------------------------------------------------------

OSGi doesn't track dependencies among native code libraries. It only covers the case where a bundle does a System.loadLibrary(). There are some ways to deal with this deficiency apparently, check out FELIX-1731 for related info.

      was (Author: rickhall):
    OSGi is doesn't track dependencies among native code libraries. It only covers the case where a bundle does a System.loadLibrary(). There are some ways to deal with this deficiency apparently, check out FELIX-1731 for related info.
  
> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871814#action_12871814 ] 

Jean-Philippe CLEMENT edited comment on FELIX-2350 at 5/26/10 1:06 PM:
-----------------------------------------------------------------------

New bluestuff test 1.0.1.

Writing the test I realized that the external DLL was not correctly named wrt the System.loadLibrary() call. One is "WiiUseJ" (upper case U) and the other "WiiuseJ" (lower case u).

So I renamed the DLL to match, which is now WiiuseJ.

The exception is not the same:
Caused by: java.lang.UnsatisfiedLinkError: E:\PortableApps\Karaf\data\cache\bundle153\version0.0\bundle.jar-lib\0\WiiuseJ.dll: Can't find dependent libraries
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)

Now I'm not too sure what the problem cause is... it seems to fail while finding the DLL dependency wiiuse.dll which is used by WiiuseJ.dll.

      was (Author: jeanphi):
    New bluestuff test 1.0.1.

Writing the test I realized that the external DLL was not correctly named wrt the System.loadLibrary() call. One is "WiiUseJ" (upper case U) and the other "WiiuseJ" (lower case u).

So I renamed the DLL to match, which is now WiiuseJ.

The exception is not the same:
Caused by: java.lang.UnsatisfiedLinkError: E:\PortableApps\Karaf\data\cache\bundle153\version0.0\bundle.jar-lib\0\WiiuseJ.dll: Can't find dependent libraries
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)

Now I'm not too sure what the problem is :S
  
> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871775#action_12871775 ] 

Richard S. Hall commented on FELIX-2350:
----------------------------------------

What am I missing? If this is related to native library loading, then it is a framework issue, not a Karaf issue.

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871779#action_12871779 ] 

Jean-Philippe CLEMENT commented on FELIX-2350:
----------------------------------------------

Sorry, when I saw the question "Which version of the Felix framework are you using?" I thought I forgot to fill the issue fields properly. So I changed them without paying attention that they were intentionally changed to the framework.

About this question I'm using the framework that is bundled with Karaf 1.4.0 (don't know how to check).

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Holger Hoffstätte (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871826#action_12871826 ] 

Holger Hoffstätte commented on FELIX-2350:
------------------------------------------

bundle 1.0.1 resolves & starts fine as well. You probably have more versions of the DLL(s) on your %PATH% and that messes up either the initial or the dependencies' resolution.


> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Philippe CLEMENT updated FELIX-2350:
-----------------------------------------

    Attachment: bluestuff-1.0.1.jar

New bluestuff test 1.0.1.

Writing the test I mentioned that the external DLL was not correctly named wrt the System.loadLibrary() call. One is "WiiUseJ" (upper case U) and the other "WiiuseJ" (lower case u).

So I renamed the DLL to match, which is now WiiuseJ.

The exception is not the same:
Caused by: java.lang.UnsatisfiedLinkError: E:\PortableApps\Karaf\data\cache\bundle153\version0.0\bundle.jar-lib\0\WiiuseJ.dll: Can't find dependent libraries
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)

Now I'm not too sure what the problem is :S

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall closed FELIX-2350.
----------------------------------

      Assignee: Richard S. Hall
    Resolution: Not A Problem

Working as expected.

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>            Assignee: Richard S. Hall
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Philippe CLEMENT updated FELIX-2350:
-----------------------------------------

    Component/s: Karaf
                     (was: Framework)

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Philippe CLEMENT updated FELIX-2350:
-----------------------------------------

    Affects Version/s: karaf-1.4.0

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-2350:
-----------------------------------

    Affects Version/s:     (was: karaf-1.4.0)

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871191#action_12871191 ] 

Richard S. Hall commented on FELIX-2350:
----------------------------------------

Which version of the Felix framework are you using?

Could you attach an example bundle that fails?

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871045#action_12871045 ] 

Jean-Philippe CLEMENT commented on FELIX-2350:
----------------------------------------------

Well, I'm not too sure there is a problem for the dll dependency (X => Y) as the failure occurs while trying to load the first one (X).

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Holger Hoffstätte (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869607#action_12869607 ] 

Holger Hoffstätte commented on FELIX-2350:
------------------------------------------

This might even be according to the spec, though this particular case is not covered as far as I remember. Can you try in equinox, just to see what happens?


> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871814#action_12871814 ] 

Jean-Philippe CLEMENT edited comment on FELIX-2350 at 5/26/10 1:04 PM:
-----------------------------------------------------------------------

New bluestuff test 1.0.1.

Writing the test I realized that the external DLL was not correctly named wrt the System.loadLibrary() call. One is "WiiUseJ" (upper case U) and the other "WiiuseJ" (lower case u).

So I renamed the DLL to match, which is now WiiuseJ.

The exception is not the same:
Caused by: java.lang.UnsatisfiedLinkError: E:\PortableApps\Karaf\data\cache\bundle153\version0.0\bundle.jar-lib\0\WiiuseJ.dll: Can't find dependent libraries
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)

Now I'm not too sure what the problem is :S

      was (Author: jeanphi):
    New bluestuff test 1.0.1.

Writing the test I mentioned that the external DLL was not correctly named wrt the System.loadLibrary() call. One is "WiiUseJ" (upper case U) and the other "WiiuseJ" (lower case u).

So I renamed the DLL to match, which is now WiiuseJ.

The exception is not the same:
Caused by: java.lang.UnsatisfiedLinkError: E:\PortableApps\Karaf\data\cache\bundle153\version0.0\bundle.jar-lib\0\WiiuseJ.dll: Can't find dependent libraries
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)

Now I'm not too sure what the problem is :S
  
> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Holger Hoffstätte (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871825#action_12871825 ] 

Holger Hoffstätte commented on FELIX-2350:
------------------------------------------

The attached bundle resolves & starts fine for me in Equinox and Felix 2.0.5. :)


> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870077#action_12870077 ] 

Richard S. Hall commented on FELIX-2350:
----------------------------------------

OSGi is doesn't track dependencies among native code libraries. It only covers the case where a bundle does a System.loadLibrary(). Check out FELIX-1731 for related info.

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870077#action_12870077 ] 

Richard S. Hall edited comment on FELIX-2350 at 5/21/10 1:54 PM:
-----------------------------------------------------------------

OSGi is doesn't track dependencies among native code libraries. It only covers the case where a bundle does a System.loadLibrary(). There are some ways to deal with this deficiency apparently, check out FELIX-1731 for related info.

      was (Author: rickhall):
    OSGi is doesn't track dependencies among native code libraries. It only covers the case where a bundle does a System.loadLibrary(). Check out FELIX-1731 for related info.
  
> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872130#action_12872130 ] 

Jean-Philippe CLEMENT commented on FELIX-2350:
----------------------------------------------

"I assume you had two issues [...]" => correct :)

I confirm that first loading the dependent library fixes the issue:
System.loadLibrary("wiiuse"); // Workaround
...
<call to something within wiiusej.jar which loads WiiuseJ.dll which loads wiiuse.dll>

Great! Thanks a lot!!!

PS: This is a very easy and consistent workaround, so, as far as I'm concerned, it's fine

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871789#action_12871789 ] 

Richard S. Hall commented on FELIX-2350:
----------------------------------------

Any chance you can attach an example bundle?

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871964#action_12871964 ] 

Richard S. Hall commented on FELIX-2350:
----------------------------------------

Case sensitivity is a known issue for Windows clients that causes issues, so I assume you had two issues:

1) The wrong case.
2) A dependent library.

You have fixed the first issue, but now you need to deal with the second. OSGi doesn't handle dependent native libraries since it cannot natively intercept library loads. One work around is to manually load the dependent library first in your budnle, then the other library should get its dependency satisfied.

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>         Attachments: bluestuff-1.0.0.jar, bluestuff-1.0.1.jar
>
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2350) Bundle inner jar cannot load libraries

Posted by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Philippe CLEMENT updated FELIX-2350:
-----------------------------------------

    Component/s: Framework
                     (was: Karaf)

oops... trying to roll back... sorry

> Bundle inner jar cannot load libraries
> --------------------------------------
>
>                 Key: FELIX-2350
>                 URL: https://issues.apache.org/jira/browse/FELIX-2350
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: karaf-1.4.0
>         Environment: Windows XP
>            Reporter: Jean-Philippe CLEMENT
>
> I added a bundle which wraps a utility jar J provided by an external provider. This jar makes use of a dll X which uses another dll Y.
> The bundle archive contains (first level):
>  com
>  META-INF
>  OSGI-INF
>  X
>  Y
>  J
> The bundle manifest file contains (not complete):
>  Bundle-ClassPath: .,J
>  Bundle-NativeCode: X ; Y ; osname=Win32 ; processor=x86
> In order to activate the dll X, J contains a java code which does a System.loadLibrary("X"). This code fails when starting the bundle with the message (*):
> Caused by: java.lang.UnsatisfiedLinkError: no X in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
> 	...
> However, moving the System.loadLibrary to the direct bundle java code succeeds. Then everything is fine.
> Looks like it is a bug.
> (*) Failing code appears in the java class loading part, i.e. static { System.loadLibrary(...) }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.