It definitely looks like a bug in Felix. Please raise a JIRA for it. On Thu, Dec 1, 2011 at 17:08, Caspar MacRae <ear...@gmail.com> wrote: > > Hi, > > I've an issue with Bouncy Castle JCE running with Felix (I found this while > trying to extend our custom Karaf distro, it seems to be a problem with > Karaf 2.2.0 (Felix 3.0.8) through to 2.2.4 (Felix 3.0.9) but doesn't happen > when I use Equinox. > > > Could not create framework: java.lang.ArrayIndexOutOfBoundsException: -1 > java.lang.ArrayIndexOutOfBoundsException: -1 > at java.util.ArrayList.get(ArrayList.java:324) > at > org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.java:1050) > at > org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java:859) > at org.apache.felix.framework.Felix.toString(Felix.java:1019) > at org.apache.felix.framework.Logger.doLog(Logger.java:128) > at org.apache.felix.framework.Logger._log(Logger.java:181) > at org.apache.felix.framework.Logger.log(Logger.java:114) > at > org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:201) > at org.apache.felix.framework.Felix.<init>(Felix.java:374) > at > org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28) > at org.apache.karaf.main.Main.launch(Main.java:266) > at org.apache.karaf.main.Main.main(Main.java:427) > > > Steps to reproduce: > > wget > http://www.apache.org/dyn/closer.cgi/karaf/2.2.4/apache-karaf-2.2.4.tar.gz > > tar -xvzf apache-karaf-2.2.4.tar.gz > > cd apache-karaf-2.2.4/ > > # Assuming you've got bcprov-jdk16-1.46.jar in your maven repo > > cp ~/.m2/repository/org/bouncycastle/bcprov-jdk16/1.46/bcprov-jdk16-1.46.jar > ./lib/ext/ > > nano etc/custom.properties # Add the following: > > org.osgi.framework.system.packages.extra = \ > org.bouncycastle.math.ec;version=1.46; \ > org.bouncycastle.jce.provider;version=1.46; > org.apache.felix.karaf.security.providers = > org.bouncycastle.jce.provider.BouncyCastleProvider > org.osgi.framework.bootdelegation = org.bouncycastle.*; > > ./bin/karaf > # It exits immediately with the stacktrace above > > > Am I doing something incredibly stupid or should a bug be raised (with Karaf > or Felix)? > > > thanks, > Caspar >
-- ------------------------ Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com