Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Publisher Problem with 3.6M5("No provisioning agent provider is available" error)
Publisher Problem with 3.6M5 [message #517676] Mon, 01 March 2010 16:26 Go to next message
Philip Borlin is currently offline Philip BorlinFriend
Messages: 30
Registered: July 2009
I just upgraded from 3.5.1 to 3.6M5 in order to test out the new P2 API but my external builds broke. I am using the pdebuild ant tasks running through Hudson. This build system had been working perfectly for months under 3.5.1.

I am not sure what relevant info to post but here is a snippet of the log file that shows the error:

     [java] checkCompilationResults:
     [java] postProcess:
     [java] assemble:
     [java] preAssemble:
     [java] allElements:
     [java] allElementsDelegator:
     [java] init:
     [java] assembleElement:
     [java] main:
     [java] defaultAssemble:
     [java] main:
     [java] properties:
     [java] init:

     [java]     [mkdir] Created dir: /hudson/jobs/myJob/workspace/build/buildDirectory/plugins/myplugin/myplugin_1.0.0.201002282002
     [java]      [copy] Copying 1 file to /hudson/jobs/myJob/workspace/build/buildDirectory/plugins/myplugin

     [java] apitools.generation:
     [java] [eclipse.gatherBundle] java.lang.RuntimeException: No provisioning agent provider is available
     [java] [eclipse.gatherBundle] 	at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.setupAgent(
     [java] [eclipse.gatherBundle] 	at
     [java] [eclipse.gatherBundle] 	at

The applicable setupAgent code where the error occurs is:

	ServiceReference providerRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
	if (providerRef == null)
		throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$

So it looks like the ProvisioningAgentProvider service is not setup. Is this something I have to do manually or is there a new bundle that I have to include in my build system that wasn't present in 3.5.1?

More information available of course, I didn't want to have information overload on the first post.

Thanks for the help,
Re: Publisher Problem with 3.6M5 [message #517713 is a reply to message #517676] Mon, 01 March 2010 19:33 Go to previous message
Philip Borlin is currently offline Philip BorlinFriend
Messages: 30
Registered: July 2009
I found another related problem. To update my application I was using a variation of the P2Util that was kind of the early access example of how to update your application why you waited for the official P2 API to come out. I updated my code and got it to compile, but early on the P2Util would manually start bundles it needed. The code looks like this:

	BundleContext bundleContext = bundle.getBundleContext();
	ServiceReference packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
	PackageAdmin packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);

	getBundle("org.eclipse.equinox.p2.exemplarysetup", packageAdmin).start(Bundle.START_TRANSIENT);
	getBundle("org.eclipse.equinox.frameworkadmin.equinox", packageAdmin).start(Bundle.START_TRANSIENT);
	getBundle("org.eclipse.equinox.simpleconfigurator.manipulator", packageAdmin).start(Bundle.START_TRANSIENT);
	getBundle("org.eclipse.equinox.p2.engine", packageAdmin).start(Bundle.START_TRANSIENT);

Under 3.6M5 I am getting an exception in these lines of the Activator class of the org.eclipse.equinox.p2.exemplarysetup bundle:

	ServiceReference agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
	IProvisioningAgentProvider provider = (IProvisioningAgentProvider) context.getService(agentProviderRef);

stating that "A null service reference is not allowed."

So here is a second example of problems with the IProvisioningAgentProvider although this one got one step farther by actually loading the ServiceReference.
Previous Topic:Server Side Equinox - JNDI
Next Topic:Mixing planner and slicer for target platforms?
Goto Forum:

Current Time: Mon Jun 18 19:41:31 GMT 2018

Powered by FUDForum. Page generated in 0.01750 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top