1
votes

I have to merge p2 with equinox transforms in a rcp application. I have in my config.ini this configuration:

osgi.bundles=org.eclipse.equinox.ds@2:\start,org.eclipse.osgi@-1:\start,org.eclipse.core.runtime@start,org.eclipse.equinox.common@2:\start,org.eclipse.equinox.transforms.xslt@1:\start,org.eclipse.equinox.transforms.xslt.plugin@1:\start osgi.framework.extensions=org.eclipse.equinox.transforms.hook

I have in my transform.csv this

org.eclipse.equinox.p2.ui.sdk,transforms.product,/actionSetUpdate.xslt

in my Activator this:

public void start(BundleContext context) throws Exception {
        super.start(context);
        plugin = this;
        Dictionary properties = new Hashtable();
        properties.put("equinox.transformerType", "xslt");
        registration = context.registerService(URL.class.getName(), context.getBundle().getEntry("/transform.csv"), properties);
    }

    public void stop(BundleContext context) throws Exception {
        plugin = null;
        super.stop(context);
        if (registration != null)
            registration.unregister();
    }

but it doesn't work.

!ENTRY org.eclipse.equinox.transforms.xslt.plugin 4 0 2012-01-23 13:23:07.043 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: The activator org.eclipse.equinox.internal.transforms.xslt.plugin.Activator for bundle org.eclipse.equinox.transforms.xslt.plugin is invalid at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) Caused by: java.lang.ClassNotFoundException: org.eclipse.equinox.internal.transforms.xslt.plugin.Activator at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:164) ... 12 more Root exception: java.lang.ClassNotFoundException: org.eclipse.equinox.internal.transforms.xslt.plugin.Activator at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:164) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.osgi 4 0 2012-01-23 13:23:07.824 !MESSAGE Bundle org.eclipse.equinox.transforms.xslt.plugin_1.0.0.qualifier [59] is not active.

!ENTRY org.eclipse.osgi 2 0 2012-01-23 13:23:07.996 !MESSAGE One or more bundles are not resolved because the following root constraints are not resolved: !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:07.996 !MESSAGE Bundle reference:file:/C:/Users/CSP/Desktop/eclipse-jee-indigo-SR1-win32-x86_64/eclipse/plugins/org.eclipse.equinox.p2.operations_2.1.0.v20110511-1821.jar was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.operations 2 0 2012-01-23 13:23:07.996 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.configurator_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:07.996 !MESSAGE Bundle reference:file:/C:/Users/CSP/Desktop/eclipse-jee-indigo-SR1-win32-x86_64/eclipse/plugins/org.eclipse.equinox.p2.ui_2.1.0.v20110601.jar was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.ui 2 0 2012-01-23 13:23:07.996 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.configurator_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:07.996 !MESSAGE Bundle reference:file:/C:/Users/CSP/Desktop/eclipse-jee-indigo-SR1-win32-x86_64/eclipse/plugins/org.eclipse.equinox.p2.director_2.1.0.v20110504-1715.jar was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.director 2 0 2012-01-23 13:23:07.996 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.configurator_0.0.0.

!ENTRY org.eclipse.osgi 2 0 2012-01-23 13:23:08.027 !MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists: !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:08.027 !MESSAGE Bundle org.eclipse.equinox.p2.director_2.1.0.v20110504-1715 [23] was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.director 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.configurator_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:08.027 !MESSAGE Bundle org.eclipse.equinox.p2.operations_2.1.0.v20110511-1821 [28] was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.operations 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.p2.director_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.operations 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.configurator_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.operations 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.p2.director_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.operations 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.p2.planner_[2.0.0,3.0.0). !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:08.027 !MESSAGE Bundle org.eclipse.equinox.p2.ui_2.1.0.v20110601 [30] was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.ui 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.p2.director_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.configurator_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.p2.operations_[2.0.0,3.0.0). !SUBENTRY 2 org.eclipse.equinox.p2.ui 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.p2.planner_[2.0.0,3.0.0). !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:08.027 !MESSAGE Bundle org.eclipse.equinox.p2.ui.sdk_1.0.200.v20110502-1955 [31] was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing required bundle org.eclipse.equinox.p2.ui_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing optionally required bundle org.eclipse.compare_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.p2.operations_[2.0.0,3.0.0). !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:08.027 !MESSAGE Bundle org.eclipse.equinox.p2.ui.sdk.scheduler_1.0.100.v20110502-1955 [32] was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk.scheduler 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing required bundle org.eclipse.equinox.p2.updatechecker_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk.scheduler 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing required bundle org.eclipse.equinox.p2.ui_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk.scheduler 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.p2.ui.actions_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk.scheduler 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.p2.ui.query_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk.scheduler 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.internal.provisional.p2.updatechecker_0.0.0. !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk.scheduler 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.p2.operations_[2.0.0,3.0.0). !SUBENTRY 2 org.eclipse.equinox.p2.ui.sdk.scheduler 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.p2.ui_[2.0.0,3.0.0). !SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-23 13:23:08.027 !MESSAGE Bundle org.eclipse.equinox.p2.updatechecker_1.1.200.v20110502-1955 [33] was not resolved. !SUBENTRY 2 org.eclipse.equinox.p2.updatechecker 2 0 2012-01-23 13:23:08.027 !MESSAGE Missing imported package org.eclipse.equinox.p2.planner_[2.0.0,3.0.0).

1

1 Answers

1
votes

Seems to me you have not included required bundles. Stacktrace says that several packages from p2 cannot be resolved. Make sure you have resolved all dependecies that are required by p2.