aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Ross (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ARIES-927) Imports org.osgi.service.framework package as optional but assumes it's there nevertheless.
Date Tue, 25 Sep 2012 23:58:10 GMT

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

John Ross updated ARIES-927:
----------------------------

    Attachment: aries927.patch

Proposed patch. The call to "b instanceof CompositeBundle" is protected by a boolean variable
indicating whether or not the package is supported.

I can commit this myself if there are no objections.
                
> Imports org.osgi.service.framework package as optional but assumes it's there nevertheless.
> -------------------------------------------------------------------------------------------
>
>                 Key: ARIES-927
>                 URL: https://issues.apache.org/jira/browse/ARIES-927
>             Project: Aries
>          Issue Type: Bug
>          Components: Util
>            Reporter: John Ross
>         Attachments: aries927.patch
>
>
> Util imports the org.osgi.service.framework package as optional. However, the InternalRecursiveBundleTracker
invokes "x instanceof CompositeBundle" in the addingBundle() method without protection. This
results in a NoClassDefFoundError, like the one below, in environments where the package is
not available. One such environment is the OSGi CT, where "private" package imports, such
as the x-internal org.osgi.service.framework package provided by Equinox, are forbidden.
> ! Failed to start bundle org.apache.aries.blueprint-1.0.0, exception activator error
org/osgi/service/framework/CompositeBundle from: org.apache.aries.util.tracker.InternalRecursiveBundleTracker:addingBundle#67
> org.osgi.framework.BundleException: Exception in org.apache.aries.blueprint.container.BlueprintExtender.start()
of bundle org.apache.aries.blueprint.
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
> 	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
> 	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
> 	at aQute.launcher.Launcher.update(Launcher.java:287)
> 	at aQute.launcher.Launcher.activate(Launcher.java:212)
> 	at aQute.launcher.Launcher.run(Launcher.java:133)
> 	at aQute.launcher.Launcher.main(Launcher.java:68)
> Caused by: java.lang.NoClassDefFoundError: org/osgi/service/framework/CompositeBundle
> 	at org.apache.aries.util.tracker.InternalRecursiveBundleTracker.addingBundle(InternalRecursiveBundleTracker.java:67)
> 	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)
> 	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
> 	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
> 	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
> 	at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
> 	at org.apache.aries.util.tracker.RecursiveBundleTracker.open(RecursiveBundleTracker.java:95)
> 	at org.apache.aries.blueprint.container.BlueprintExtender$2.serviceFound(BlueprintExtender.java:104)
> 	at org.apache.aries.util.tracker.SingleServiceTracker.update(SingleServiceTracker.java:157)
> 	at org.apache.aries.util.tracker.SingleServiceTracker.findMatchingReference(SingleServiceTracker.java:115)
> 	at org.apache.aries.util.tracker.SingleServiceTracker.open(SingleServiceTracker.java:98)
> 	at org.apache.aries.blueprint.container.BlueprintExtender.start(BlueprintExtender.java:112)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
> 	... 7 more
> Caused by: java.lang.ClassNotFoundException: org.osgi.service.framework.CompositeBundle
> 	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
> 	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
> 	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
> 	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> 	... 22 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message