When running test, paxdrone complains missing import-package:org.ops4j.pax.drone.connector.paxrunner; version="0.0.0"

Description

I tried to run this test with equinox and felix platform the same
error occurred.

Error:
TestPrivateLibraries(org.ops4j.pax.wicket.it.classResolver.ClassResolverByPidTest)
Time elapsed: 85.666 sec <<< ERROR!
org.osgi.framework.BundleException: The bundle could not be resolved.
Reason: Missing Constraint: Import-Package:
org.ops4j.pax.drone.connector.paxrunner; version="0.0.0"
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at org.ops4j.pax.drone.zombie.RemoteDroneDelegate.execute(RemoteDroneDelegate.java:33)

Environment

None

Activity

Show:
Toni Menzel
July 5, 2008, 11:37 AM

1.
First, there is a very simple method to "re-reload" the failed drone test standalone with console and everything:
Go to the tmp folder (on mac/linux its /tmp). There you should find a paxdrone-runner folder.
This is the working directory of paxrunner.
You can load its "old" state using pax-run.sh like that:
cd /tmp
pax-run.sh --ups=true --workingDirectory=paxdrone_runner
Here you go and can look whats wrong.

2.
For the concrete problem here:
I admid that the documentation lacks at this point. Here's what the "bundle-on-the-fly" will contain:
It just takes all classes as well as test-classes, pipes it through bnd and declares imports optional.
In your case, the drone-bundle (=symbolic name) just contains the test-class and not all the stuff it references to.
Today, you must declare all other bundles you need in the confiiguration:
configuration.addBundle( "mvn:org.ops4j.pax.wicket.integrationTest.bundles/simpleLibraries" );
configuration.addBundle( "mvn:org.ops4j.pax.wicket.integrationTest/bootstrap" );
configuration.addBundle( "mvn:org.ops4j.pax.wicket/pax-wicket-service" );

Still, the bootstap bundle (that contains references to paxrunner-connector packages) does not resolve.
I those are nasty references that bnd finds but are not used on runtime. So the bundle-on-the-fly just makes it "ignore".
Agreed that this is nothing to keep that way - Will look at that later - have to go out for now.

But with those help you probably find the glitch.
I will definitely try to improve reporting asap.

Toni Menzel
July 5, 2008, 11:55 AM

the original "Missing Constraint: Import-Package:
org.ops4j.pax.drone.connector.paxrunner;" is just there because the dependency is declared by an external bundle (not under pax-drone control). Pax Drone itself declares those optional as they are just used to define the configuration and not at runtime.

just to make it clear

cheers.

Toni Menzel
July 6, 2008, 2:54 PM

fixed when using latest 0.1.1-SNAPSHOT from sources.

please verify. Among with some other issues (reporting, don't always reload all bundles - currently its the paranoid man's behavior.. ) we will make a 0.1.1 release during next week.

Toni Menzel
July 9, 2008, 8:02 AM

confirmed

Assignee

Toni Menzel

Reporter

Edward Yakop

Labels

None

Fix versions

Affects versions

Priority

Major
Configure