I'm doing some experiments with an embedded Felix container running
under different execution environments. Running under Java 5
(jdk1.5.0_12) I tried to install a bundle with a required execution
environment set to "JavaSE-1.6" in the hope that it would fail.

The following exception was logged:

WARNING: org.osgi.framework.BundleException: Unable to cache bundle:
null
        at
org.apache.felix.framework.Felix.installBundle(Felix.java:2321)
        at
org.apache.felix.framework.Felix.installBundle(Felix.java:2277)
        at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContext
Impl.java:130)
        ...

Caused by: java.lang.NullPointerException
        at
org.apache.felix.framework.cache.BundleArchive.initialize(BundleArchive.
java:874)
        at
org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java
:144)
        at
org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:176
)
        at
org.apache.felix.framework.Felix.installBundle(Felix.java:2317)
        ... 32 more

However, that exception was then eaten, installBundle didn't throw
anything, so my code then carried on running. The Bundle object is
returned and has the state Bundle.INSTALLED. It is also listed in a call
to felix.getBundleContext().getBundles(). Any attempt to use it rightly
results in:

java.lang.UnsupportedClassVersionError: Bad version number in .class
file

It looks to me like the install is succeeding where it should realy
fail.

Nick



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to