Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » java.io.IOException: File that was copied to backup could not be deleted: ... eclipse.exe(Error during update)
java.io.IOException: File that was copied to backup could not be deleted: ... eclipse.exe [message #1585260] Mon, 26 January 2015 06:59 Go to next message
Dinko Ivanov is currently offline Dinko IvanovFriend
Messages: 27
Registered: July 2009
Junior Member
Hi,

I'm building a self updating RCP product using the approach described here:
https://mahichir.wordpress.com/2012/08/07/eclipse-rcp-and-p2-headless-update-on-startup/
The product is then packaged as native executable installer (using Advanced Installer tool) and distributed. It usually gets installed in the program files folder. At some point I package an update (p2 repository using the Product Export wizard) and upload it to an update site.
The product gets the update, but the update operation fails with a message:

!MESSAGE Backup of file C:\Program Files\MyCompany\MyProduct\eclipse.exe failed.
!STACK 0
java.io.IOException: File that was copied to backup could not be deleted: C:\Program Files\MyCompany\MyProduct\eclipse.exe
	at org.eclipse.equinox.internal.p2.touchpoint.natives.BackupStore.moveToBackup(BackupStore.java:282)
	at org.eclipse.equinox.internal.p2.touchpoint.natives.BackupStore.backup(BackupStore.java:248)
        .............

The complete log file is attached.

I'm using Eclipse Luna 4.4.1 both as IDE and a target platform.
I'm wondering why P2 tries to replace the eclipse.exe file in the existing application? Can I tell somehow the repository to not include this binary artifact (eclipse.exe), so that the update goes smoothly - probably during the export?
At this moment I manually patch the generated content.xml (in the content.jar) in the p2 repository by removing the occurences of the eclipse.exe native artifact.

Any help would be appreciated.

Best Regards,
Dinko
  • Attachment: log.txt
    (Size: 7.00KB, Downloaded 308 times)
Re: java.io.IOException: File that was copied to backup could not be deleted: ... eclipse.exe [message #1699055 is a reply to message #1585260] Fri, 19 June 2015 21:03 Go to previous messageGo to next message
Trace Windham is currently offline Trace WindhamFriend
Messages: 17
Registered: July 2009
Junior Member
I'm seeing a similar problem.

I'm using Eclipse Luna 4.4.2 as my target platform, and the class BackupStore is in version 1.1.100.v20140523-0116 of the org.eclipse.equinox.p2.touchpoint.natives bundle.

When I try to update my RCP application, I get this stack trace...

java.io.IOException: File that was copied to backup could not be deleted: C:\AMX\AMX Design Suite\jre\lib\ext\sunec.jar
at org.eclipse.equinox.internal.p2.touchpoint.natives.BackupStore.moveToBackup(BackupStore.java:282)
at org.eclipse.equinox.internal.p2.touchpoint.natives.BackupStore.backup(BackupStore.java:248)
at org.eclipse.equinox.internal.p2.touchpoint.natives.LazyBackupStore.backup(LazyBackupStore.java:36)
at org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction.cleanupzip(CleanupzipAction.java:85)
at org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction.execute(CleanupzipAction.java:30)
at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:38)
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)

Similar error, different file than yours.

I hope someone sees this and offers us some pointers on how to get around this issue.
Re: java.io.IOException: File that was copied to backup could not be deleted: ... eclipse.exe [message #1714420 is a reply to message #1699055] Thu, 12 November 2015 14:27 Go to previous message
ilke Muhtar is currently offline ilke MuhtarFriend
Messages: 47
Registered: September 2015
Member
try to start eclipse update via luncher.jar instead of eclipse.exe for update process. There is a bug for windows. https://bugs.eclipse.org/bugs/show_bug.cgi?id=427148

Try starting eclipse update via "plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar"
Previous Topic:Target platform resolves from invalid(?) locations
Next Topic:org.eclipse.equinox.p2.reconciler.dropins maven repository bundle not available
Goto Forum:
  


Current Time: Sat Dec 14 02:06:06 GMT 2024

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

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

Back to the top