[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [p2-dev] java.lang.RuntimeException: Attempt to access stopped agent: org.eclipse.equinox.internal.p2.core.ProvisioningAgent@65fa65fa
|
Can you enter a bug for this? What's supposed to happen is that when the agent is stopped, it tells all registered services to stop. In the method SimpleProfileRegistry#stop it joins any existing preference save job. This should ensure there is no preference save job running after the agent has been stopped. Maybe in your case you never access the IProfileRegistry service so that service is never created in the agent? Or, there could be a timing problem I'm missing. In any case, please enter a bug and CC me and I can take a look.
John
On Thu, Mar 18, 2010 at 12:31 PM, Thomas M Houser
<tmhouser@xxxxxxxxxx> wrote:
I am using the IProvisioningAgentProvider.createAgent()
and IProvisioningAgent.stop() APIs and I'm getting this exception:
java.lang.RuntimeException: Attempt
to access stopped agent: org.eclipse.equinox.internal.p2.core.ProvisioningAgent@65fa65fa
at
org.eclipse.equinox.internal.p2.core.ProvisioningAgent.checkRunning(ProvisioningAgent.java:79)
at
org.eclipse.equinox.internal.p2.core.ProvisioningAgent.getService(ProvisioningAgent.java:45)
at
org.eclipse.equinox.internal.p2.engine.ProfilePreferences.doSave(ProfilePreferences.java:112)
at
org.eclipse.equinox.internal.p2.engine.ProfilePreferences$SaveJob.run(ProfilePreferences.java:49)
at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The ProfilePreferences.save() method
schedules a job with the IProvisioningAgent instance that I created and
am stopping:
Thread [main] (Suspended (breakpoint
at line 40 in ProfilePreferences$SaveJob))
ProfilePreferences$SaveJob.<init>(ProfilePreferences,
IProvisioningAgent) line: 40
ProfilePreferences.save()
line: 275
ProfilePreferences(EclipsePreferences).flush()
line: 352
ProfilePreferences(EclipsePreferences).flush()
line: 340
MetadataRepositoryManager(AbstractRepositoryManager<T>).saveToPreferences()
line: 979
MetadataRepositoryManager(AbstractRepositoryManager<T>).remember(RepositoryInfo<T>,
boolean) line: 839
MetadataRepositoryManager(AbstractRepositoryManager<T>).addRepository(URI,
boolean, boolean) line: 167
MetadataRepositoryManager(AbstractRepositoryManager<T>).loadRepository(URI,
IProgressMonitor, String, int) line: 639
MetadataRepositoryManager(AbstractRepositoryManager<T>).doCreateRepository(URI,
String, String, Map<String,String>) line: 271
MetadataRepositoryManager.createRepository(URI,
String, String, Map<String,String>) line: 41
How can I safely stop an IProvisioningAgent
instance when there is a scheduled job that will access it? Is
this a bug?
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev