1 Reply Latest reply on Jul 4, 2011 4:47 AM by Gert Vanthienen

    Locked jar upon failed (hot) deployment --> issue for production systems?!

    Michael Grom Newbie

      Dear Forum,

      while toying around with my camel routes I frequently have to deploy/undeploy the jar file containing the camel deployment to the Fuse ESB. It happens that errors creep in which are raising exceptions in the ESB at deployment time. In most cases (all cases according to my experience), the jar file that contains the "bad code" is locked and cannot be removed without shutting down the ESB.

      -


      C:\apache-servicemix-4.4.0-fuse-00-27\projects\camel-bundle>del ..\..\deploy\camel-bundle-1.0-SNAPSHOT.jar

      C:\apache-servicemix-4.4.0-fuse-00-27\deploy\camel-bundle-1.0-SNAPSHOT.jar

      The process cannot access the file because it is being used by another process.

      -


      This basically means that the ESB has to be shut down to "unlock" the jar.

      Despite of one should have carefully tested the deployment jar, things like this can happen and if they happen to a production ESB, you have a big production issue.

      As you might have noticed, my scenario is running on Windows (XP..wooo!) and this problem might be specific to Windows and doesn't show up on other systems like Solaris or Linux. But if it is a general problem, this could be a show stopper for Fuse ESB (ServiceMix) to be the production ESB in many enterprises (including ours).

       

      Kind regards

      Michael

        • 1. Re: Locked jar upon failed (hot) deployment --> issue for production systems?!
          Gert Vanthienen Novice

          Michael,

           

           

          Thanks for reporting this!  Most of us are using *nix-like development boxes and I just noticed that our system test suite does not contain a pure file-based deployment test (they all use ssh commands or JMX connections to interact with the runtimes) so we will add that test.

           

          For your current situation, could you try using Process Explorer, determine the process that is holding on the file lock?  In my experience, this could be the ServiceMix Java process but tit might as well be a virus scanner or something like that that is holding on to it.

           

           

          Regards,

           

          Gert Vanthienen