Bug 353697 - BackingStoreException at end of ant Repo2Runnable fails ant scripts
Summary: BackingStoreException at end of ant Repo2Runnable fails ant scripts
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 4.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-03 03:30 EDT by Pieter-Jan Pintens CLA
Modified: 2022-11-17 14:29 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pieter-Jan Pintens CLA 2011-08-03 03:30:39 EDT
Build Identifier: I20110613-1736

We have a repo2runnable task that uses 2 repositories as source:

<p2.repo2runnable>
<source>
<repository location="http://artifacts.intranet/scriptura-head-integration/lastSuccessful/archive/root/packaging.build/dist/repositories/base-platform"/>
<repository location="http://artifacts.intranet/scriptura-head-integration/lastSuccessful/archive/root/packaging.build/dist/repositories/packaging.distribution.scriptura"/>
</source>
<destination location="file:/${base.repository.work}"/>
</p2.repo2runnable>

The task starts fine, fetches all but fails in the very end with following exception:

!MESSAGE Application error
!STACK 1
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513)
        at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandl
e.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAppli
cation(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ec
lipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: C:\hudson-build\workspace\scriptura-head-vista-externaltests\root\pac
kaging.build\ant\test.xml:7: Error occurred while transforming repository: An er
ror occurred while collecting items to be installed.
        at org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableT
ask.execute(Repo2RunnableTask.java:62)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTarge
ts(EclipseDefaultExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRu
nner.java:663)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRu
nner.java:535)
        ... 19 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: An error occurred whi
le collecting items to be installed
        at org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableT
ask.execute(Repo2RunnableTask.java:59)
        ... 35 more
Root exception:
C:\hudson-build\workspace\scriptura-head-vista-externaltests\root\packaging.buil
d\ant\test.xml:7: Error occurred while transforming repository: An error occurre
d while collecting items to be installed.
        at org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableT
ask.execute(Repo2RunnableTask.java:62)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTarge
ts(EclipseDefaultExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRu
nner.java:663)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRu
nner.java:535)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513)
        at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandl
e.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAppli
cation(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ec
lipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: org.eclipse.equinox.p2.core.ProvisionException: An error occurred whi
le collecting items to be installed
        at org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableT
ask.execute(Repo2RunnableTask.java:59)
        ... 35 more
[p2] Tue Aug 02 17:41:02 CEST 2011 - [main] Unsaved preferences when shutting do
wn org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager

[p2] Tue Aug 02 17:41:03 CEST 2011 - [main] Unsaved preferences when shutting do
wn org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager

org.osgi.service.prefs.BackingStoreException: Unable to determine provisioning a
gent from location: file:\2fC:\2fhudson-build\2fworkspace\2fscriptura-head-vista
-externaltests\2freleng\2fcom.id.releng.runtime\2fconfiguration\2f..\2fp2\2f
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.getAgent(Pr
ofilePreferences.java:159)
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.save(Profil
ePreferences.java:280)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(Eclips
ePreferences.java:353)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(Eclips
ePreferences.java:341)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepository
Manager.saveToPreferences(AbstractRepositoryManager.java:1015)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepository
Manager.stop(AbstractRepositoryManager.java:1062)
        at org.eclipse.equinox.internal.p2.core.ProvisioningAgent.unregisterServ
ice(ProvisioningAgent.java:122)
        at org.eclipse.equinox.internal.p2.core.ProvisioningAgent.removedService
(ProvisioningAgent.java:183)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(Servic
eTracker.java:1006)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(Servic
eTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:35
2)
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTr
acker.java:949)
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.ser
viceChanged(FilteredServiceListener.java:104)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEv
ent(BundleContextImpl.java:861)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEventPrivileged(ServiceRegistry.java:819)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEvent(ServiceRegistry.java:771)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unr
egister(ServiceRegistrationImpl.java:225)
        at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(Inst
anceProcess.java:355)
        at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(Inst
anceProcess.java:305)
        at org.eclipse.equinox.internal.ds.Resolver.disposeComponentConfigs(Reso
lver.java:685)
        at org.eclipse.equinox.internal.ds.Resolver.disableComponents(Resolver.j
ava:661)
        at org.eclipse.equinox.internal.ds.SCRManager.stoppingBundle(SCRManager.
java:553)
        at org.eclipse.equinox.internal.ds.SCRManager.bundleChanged(SCRManager.j
ava:232)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEv
ent(BundleContextImpl.java:847)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)
        at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent
Privileged(Framework.java:1522)
        at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent
(Framework.java:1458)
        at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent
(Framework.java:1453)
        at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(Bundle
Host.java:506)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(Abstr
actBundle.java:565)
        at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Fram
ework.java:1160)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(St
artLevelManager.java:595)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStart
Level(StartLevelManager.java:257)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(S
tartLevelManager.java:215)
        at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend
(InternalSystemBundle.java:284)
        at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework
.java:690)
        at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.ja
va:597)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStart
er.java:390)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:198)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
An error has occurred. See the log file

This output is generated with -debug and some extra log options. Without these only
the first part (the exception that doesn't occur in the main thread) is shown.

When running the Repo2Runnable eclipse application (not in ant) it works just fine.





Reproducible: Always
Comment 1 Pieter-Jan Pintens CLA 2011-08-04 04:19:14 EDT
Probably this issue is caused because of signing of our repo.
We used p2.process.artifacts to sign our repo but this causes problems later on with a file that contains special characters like â,á etc. Still it would come possible to improve error logging. We had to modify the code to find out the real problem which was listed in the result (IStatus).
Comment 2 Felix Sulima CLA 2012-12-06 05:26:54 EST
We faced the same error ("Error occurred while transforming repository: An error occurred while collecting items to be installed." in ProvisionException at the same origin: org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableT
ask.execute(Repo2RunnableTask.java:59)) caused by different reasons.
The diagnostics available in the log is incomplete. The solution was to reproduce error in development environment, attach debugger and obserse IStatus (which was MultiStatus having child statuses) returned by application.run(...) manually.
I would be very helpful if error logging is improved, i.e. by logging messages from IStatus and all nested statuses recursively.
Comment 3 Christian Campo CLA 2016-08-10 09:59:51 EDT
I am having the same problem now. Can you share what you problem was at the end ? Is there an easy way to debug an ant task ?
Comment 4 Christian Campo CLA 2016-08-11 11:15:32 EDT
In my case (maybe that helps someone), I had patched a feature and a plugin in a zipped p2 repo and the MD5 hash became incorrect in artifacts.xml.
Comment 5 Lars Vogel CLA 2018-12-03 09:12:02 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.
Comment 6 Lars Vogel CLA 2018-12-03 09:13:18 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.
Comment 7 Eclipse Genie CLA 2020-11-26 12:34:02 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Eclipse Genie CLA 2022-11-17 14:29:31 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.