ProvisioningAction not Found [message #1706732] |
Sat, 29 August 2015 10:55 |
|
I'm struggling with P2's ProvisioningActions.
I have a bundle that defines metaRequirements as given below:
metaRequirements.0.namespace=org.eclipse.equinox.p2.iu
metaRequirements.0.name=com.codetrails.events.install.rcp
metaRequirements.1.namespace=org.eclipse.equinox.p2.iu
metaRequirements.1.name=com.codetrails.events.uninstall.rcp
instructions.configure=com.codetrails.events.install.rcp.action();
instructions.unconfigure=com.codetrails.events.uninstall.rcp.action();
On install, however, I get the following error which terminates the installation process:
session context was:(profile=epp.package.standard, phase=org.eclipse.equinox.internal.p2.engine.phases.Configure, operand=null --> [R]com.codetrails.licensing.ctrlflow.starter 1.5.1.v20150829-1005-b52, action=org.eclipse.equinox.internal.p2.engine.MissingAction).
java.lang.IllegalArgumentException: No action found for: com.codetrails.events.install.rcp.action.
at org.eclipse.equinox.internal.p2.engine.MissingAction.execute(MissingAction.java:42)
at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:183)
at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:95)
at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:47)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:75)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
at org.eclipse.equinox.p2.operations.ProvisioningSession.performProvisioningPlan(ProvisioningSession.java:174)
at org.eclipse.equinox.p2.operations.ProfileModificationJob.runModal(ProfileModificationJob.java:79)
at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
After that error, I checked that the bundle com.codetrails.events.install.rcp is actually installed via "ss events". It is.
The bundle's plugin.xml speficies the extension:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.equinox.p2.engine.actions">
<action
class="com.codetrails.events.install.rcp.InstallAction"
name="action"
touchpointType="org.eclipse.equinox.p2.osgi"
version="1.0.0">
</action>
</extension>
</plugin>
Finally, when running the install process a second time, it works as expected. It looks like something goes wrong on first enabled of the install bundle.
Do you have any idea how to get more information?
|
|
|
Re: ProvisioningAction not Found [message #1706734 is a reply to message #1706732] |
Sat, 29 August 2015 12:02 |
|
I figured out that OSGI failed to resolve a package import to com.google.commons.base and thus apparently did not enable the one of the dependencies of the install bundle.
After changing the package imports to require-bundles it works as expected. However, I fear I'll run into class cast exceptions, linkage errors or even get exceptions during the installation when users install these bundles in different environments. Do you have any suggestions what might make osgi fail to resolve the com.google.common.base package ?
osgi> packages com.google.common.base
osgi.wiring.package; bundle-symbolic-name="com.google.guava"; bundle-version:Version="15.0.0.v201403281430"; version:Version="15.0.0"; osgi.wiring.package="com.google.common.base"; uses:="javax.annotation"<com.google.guava_15.0.0.v201403281430 [260]>
com.codetrails.codesearch_1.5.1.v20150829-1140-b000 [267] imports
com.codetrails.codesearch.workspace.rcp_1.5.1.v20150829-1140-b000 [272] imports
com.codetrails.codesearch.rcp_1.5.1.v20150829-1140-b000 [270] imports
com.codetrails.codesearch.catalogs.rcp_1.5.1.v20150829-1140-b000 [269] imports
com.codetrails.notifications.rcp_1.5.1.v20150829-1140-b000 [274] imports
org.eclipse.recommenders.jdt_2.2.4.v20150727-1137 [303] imports
org.eclipse.recommenders.net_2.2.4.v20150727-1137 [263] imports
org.eclipse.recommenders.utils.rcp_2.2.4.v20150826-1431 [304] imports
org.eclipse.recommenders.utils_2.2.4.v20150727-1137 [264] imports
com.codetrails.codesearch.setup.rcp_1.5.1.v20150829-1140-b000 [271] imports
org.eclipse.recommenders.coordinates_2.2.4.v20150827-0920 [301] imports
com.codetrails.licensing_1.5.1.v20150829-1140-b000 [258] imports
com.codetrails.events.rcp_1.5.1.v20150829-1140-b000 [256] imports
com.codetrails.aether_1.5.1.v20150829-1140-b000 [265] imports
com.codetrails.licensing.ctrlflow.starter_1.5.1.v20150829-1140-b000 [273] imports
org.eclipse.epp.logging.aeri.ui_1.0.1.v20150819-1436 [293] imports
osgi>
I'm still surprised that installing the features a second time immediately after the first attempt fails works as well.
FWIW, it seems like the uninstall/unconfigure hook does not have that problem.
Thanks for your insights,
Marcel
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03300 seconds