[
https://issues.apache.org/jira/browse/FELIX-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Holger Hoffstätte updated FELIX-1580:
-------------------------------------
Attachment: org.example.pkg.zip
This is the simple bundle project to reproduce, including the two dlls to run
(apr and pcre renamed so that they do not clash with stuff on PATH)
The activator simply load one library and should work fine in its current form.
To cause an error, either:
- simply add the second library (mypcre.dll) to the osgi.bnd instructions
- change the activator to load "foo"
Both should cause the AIOOB to occur on bundle start.
> 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
> Priority: Critical
> 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.