Required-Bundle defiend in plugin manifest not resolving at runtime

53 views Asked by At

Let me explain the problem this way. I have a plugin A and a plugin B. Plugin B is a required bundle in plugin A. Now plugin A is part of a product. When I create the product and try executing the workflow which is using this plugin A it errors out:

at null : null : null.(Unknown Source)
    at org.eclipse.core.internal.registry.ReferenceMap.put(ReferenceMap.java:351)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.getBundle(RegistryStrategyOSGI.java:151)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:166)
    at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)

This is issue is not occuring if this bundle B is not added as dependency/Required-Bundle in A.

I have tried adding plugin B to Bundle-Classpath of manifest but it was of no use. I suspect the plugin A OSGi bundle is getting corrupted due to adding B as required bundle.

How can I resolve this ? Any suggestions are welcome.

UPDATE: Added minimal info on the 2 manifest files:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: ******
Build-Jdk: 1.8.0_222
Bundle-Description: Some implementation
Bundle-SymbolicName: B;singleton:=true
Require-Bundle: *, 
 org.eclipse.core.runtime, org.eclipse.ui;resolution:=optional
Bundle-ActivationPolicy: lazy
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Copyright: ***
Bundle-DocURL: http://www.*.com/
Bundle-Vendor: **
Import-Package: j,k,l, org.eclipse.jface.layout;
 resolution:=optional, org.eclipse.swt, org.eclipse.swt.events, org.ec
 lipse.swt.internal.ole.win32, org.eclipse.swt.layout, org.eclipse.swt
 .ole.win32, org.eclipse.swt.widgets
Bundle-ContactAddress: ****
Eclipse-ExtensibleAPI: true
Export-Package: B;version="3.4.3", C;version="3.4.3", D;version="3.4.3"
Bundle-Name: B
Bundle-Version: 3.4.3
Bundle-ClassPath: .
Bundle-Localization: properties/****/i18n-resources



Manifest-Version: 1.0
Export-Package: A;version="1.0.12
 .SNAPSHOT", E;version="1.0.1
 2.SNAPSHOT"
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Built-By: someone
Bundle-Name: A
Created-By: Apache Maven 3.2.1
Bundle-Copyright: ****
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: *, B, *, org.eclipse.core.runtime, org.eclipse.jfac
 e, org.eclipse.osgi, org.eclipse.ui.workbench
Bundle-Vendor: **
Bundle-ContactAddress: **
Bundle-Version: 1.0.12.SNAPSHOT
Build-Jdk: 1.7.0_80
Bundle-Activator: someting
Bundle-ManifestVersion: 2
Bundle-Description: Plugin used to launch HTML Wizards through the SWT
 .Browser
Bundle-SymbolicName: A;singleton:
 =true
Bundle-DocURL: 
Archiver-Version: Plexus Archiver

UPDATE: Also tried adding B under Import-package header of manfest of A. Still did not work.

0

There are 0 answers