2 Replies Latest reply on Jun 12, 2013 4:51 PM by versace_lettuce

    File deletion on server start

    versace_lettuce

      Hi all!

       

      This is probably an easy question to fix but here goes:

       

      Right now I have a file in C:\jboss-4.3.0.GA_CP09\jboss-as\server\default\deploy\blah.war\blah that gets deleted everytime I try to start the server In JBoss..

       

      I have to manually add this file into that directory or else I get errors.

       

      Let me know if any additional info is needed.

       

      Thanks!

        • 1. Re: File deletion on server start
          peterj

          Question: how do you know the file disappears? Is it because the blah.war app code complains about a missing file? If so, please post the code that accesses the file; it could be that the code is not actually looking in the directory you listed. (I have run into this scenario several times helping others on the forum.)

           

          If you see the file disappear in Windows Explorer, then you might try setting the Windows security properties of the file such that no-one has write access to the file. Then start Jboss AS again and see if you get an exception thrown when the code attmepts to delete the file. That stack trace should point you to the offending code. (As far as I know, there is nothing in JBoss AS that will remove a file from a war on startup.)

          • 2. Re: File deletion on server start
            versace_lettuce

            I believe your second paragraph was the fix to my problem, thanks.

             

            -versace lettuce