New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch distribution upgrades fail on Windows #150

Closed
jamesnetherton opened this Issue May 16, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@jamesnetherton
Contributor

jamesnetherton commented May 16, 2016

Consider the following scenario:

  1. Install patch 'A' which includes fuse-patch distro 1.0
  2. Install new patch 'B' which includes fuse-patch 2.0

On Windows this leads to an error like the following:

Error executing command: java.nio.file.FileSystemException: C:\Users\james\projects\jboss-eap-6.4\.\modules\system\layers\fuse\org\wildfly\extras\patch\main\fuse-patch-core-1.6.2.jar: The process cannot access the file because it is being used by another process.

        at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86) [rt.jar:1.8.0_40]
        at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) [rt.jar:1.8.0_40]
        at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) [rt.jar:1.8.0_40]
        at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) [rt.jar:1.8.0_40]
        at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) [rt.jar:1.8.0_40]
        at java.nio.file.Files.deleteIfExists(Files.java:1165) [rt.jar:1.8.0_40]
        at org.wildfly.extras.patch.internal.WildFlyServer.updateServerFiles(WildFlyServer.java:339) [fuse-patch-core-1.6.2.jar:]
        at org.wildfly.extras.patch.internal.WildFlyServer.applySmartPatch(WildFlyServer.java:216) [fuse-patch-core-1.6.2.jar:]
        at org.wildfly.extras.patch.internal.DefaultPatchTool.installInternal(DefaultPatchTool.java:128) [fuse-patch-core-1.6.2.jar:]
        at org.wildfly.extras.patch.internal.DefaultPatchTool.update(DefaultPatchTool.java:93) [fuse-patch-core-1.6.2.jar:]
        at org.wildfly.extras.patch.internal.Main.run(Main.java:155) [fuse-patch-core-1.6.2.jar:]
        at org.wildfly.extras.patch.internal.Main.mainInternal(Main.java:64) [fuse-patch-core-1.6.2.jar:]
        at org.wildfly.extras.patch.internal.Main.main(Main.java:45) [fuse-patch-core-1.6.2.jar:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_40]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_40]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_40]
        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_40]
        at org.jboss.modules.Module.run(Module.java:312) [jboss-modules.jar:1.3.7.Final-redhat-1]
        at org.jboss.modules.Main.main(Main.java:473) [jboss-modules.jar:1.3.7.Final-redhat-1]

The files that need to be replaced are locked by the process that's attempting to do the patching. I guess *nix is more forgiving.

@jamesnetherton jamesnetherton added the bug label May 16, 2016

@jamesnetherton jamesnetherton added this to the 2.4.0 milestone May 16, 2016

@jamesnetherton jamesnetherton self-assigned this May 17, 2016

jamesnetherton added a commit to jamesnetherton/fuse-patch that referenced this issue May 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment