Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.1, 3.0.0
    • Component/s: karaf-instance, karaf-shell
    • Labels:
      None
    • Environment:

      Windows 7, Oracle JDK 1.6

      Description

      When I try to clone the root instance I get the exception:
      Error executing command: The process cannot access the file because another process has locked a portion of the file

      From the log I read:

      java.io.IOException: The process cannot access the file because another process has locked a portion of the file
      at java.io.FileInputStream.readBytes(Native Method)[:1.6.0_35]
      at java.io.FileInputStream.read(FileInputStream.java:198)[:1.6.0_35]
      at org.apache.karaf.admin.internal.AdminServiceImpl.copy(AdminServiceImpl.java:530)[43:org.apache.karaf.admin.core:2.3.0]
      at org.apache.karaf.admin.internal.AdminServiceImpl.copy(AdminServiceImpl.java:523)[43:org.apache.karaf.admin.core:2.3.0]
      at org.apache.karaf.admin.internal.AdminServiceImpl.copy(AdminServiceImpl.java:523)[43:org.apache.karaf.admin.core:2.3.0]
      at org.apache.karaf.admin.internal.AdminServiceImpl.copy(AdminServiceImpl.java:523)[43:org.apache.karaf.admin.core:2.3.0]
      at org.apache.karaf.admin.internal.AdminServiceImpl.cloneInstance(AdminServiceImpl.java:325)[43:org.apache.karaf.admin.core:2.3.0]
      at Proxy4cd52749_879e_4fa9_bb31_30fa2e0339f2.cloneInstance(Unknown Source)[:]
      at org.apache.karaf.admin.command.CloneCommand.doExecute(CloneCommand.java:57)[27:org.apache.karaf.admin.command:2.3.0]
      at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.0]
      at org.apache.karaf.shell.console.jline.Console.run(Console.java:175)[14:org.apache.karaf.shell.console:2.3.0]
      at java.lang.Thread.run(Thread.java:662)[:1.6.0_35]

        Activity

        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        I don't have the issue on Unix, so it's certainly an issue with Windows. I'm testing on a Windows VM.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - I don't have the issue on Unix, so it's certainly an issue with Windows. I'm testing on a Windows VM.
        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        NB: the problem occurs with any started instances. When an instance is started, Windows "considers" that it locks a file resource, that's why the clone is not possible. I'm going to find a workaround using a temp file.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - NB: the problem occurs with any started instances. When an instance is started, Windows "considers" that it locks a file resource, that's why the clone is not possible. I'm going to find a workaround using a temp file.
        Show
        jbonofre Jean-Baptiste Onofré added a comment - Fixed on karaf-2.3.x: http://svn.apache.org/viewvc?view=revision&revision=1446597
        Show
        jbonofre Jean-Baptiste Onofré added a comment - Fixed on Karaf trunk: http://svn.apache.org/viewvc?view=revision&revision=1446620

          People

          • Assignee:
            jbonofre Jean-Baptiste Onofré
            Reporter:
            duclad Claudiu Dumitrescu
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development