You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Holger Hoffstätte (JIRA)" <ji...@apache.org> on 2009/09/11 16:46:57 UTC

[jira] Closed: (FELIX-1580) Regression with native library handling

     [ https://issues.apache.org/jira/browse/FELIX-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Holger Hoffstätte closed FELIX-1580.
------------------------------------


Tested successfully with both the clean-room example and my original project (with multiple libraries) on Windows as well as Linux. Thanks!


> Regression with native library handling
> ---------------------------------------
>
>                 Key: FELIX-1580
>                 URL: https://issues.apache.org/jira/browse/FELIX-1580
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.0
>         Environment: generic, JDK6, tested on Windows & Linux
>            Reporter: Holger Hoffstätte
>            Assignee: Richard S. Hall
>            Priority: Critical
>             Fix For: felix-2.2.0
>
>         Attachments: org.example.pkg.zip
>
>
> I tried to update to felix-2.0.0 but my bundles with native code would not install anymore, even though they work fine under felix-1.8.1 and equinox. The following error showed up for no good reason:
> org.osgi.framework.BundleException: Activator start error in bundle org.example.pkg [23].
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:1750)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1621)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:890)
>         at org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:114)
>         at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:281)
>         at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>         at org.apache.felix.framework.util.manifestparser.R4Library.match(R4Library.java:113)
>         at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findLibrary(ModuleImpl.java:1929)
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1680)
>         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
>         at java.lang.System.loadLibrary(System.java:1028)
>         at org.example.pkg.internal.ExampleActivator.start(ExampleActivator.java:12)
>         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:667)
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:1699)
>         ... 6 more
> java.lang.ArrayIndexOutOfBoundsException: 0
> Through trial-and-error I have found the rather confusing conditions under which this error shows up:
> - a library is not found in the bundle (code passes a nonexisting name to System.loadLibrary())
> - multiple libraries are _correctly_ specified in the Bundle-NativeCode header!
> There might be other confusing combinations. ;)
> I traced this back to the changes to R4Library in r790963 (Add support for configurable native library extensions. (FELIX-1298)) where the match() method was modified. It seems that the "exts" array is empty and therefore leads to the AIOOB later.

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