Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12028

A path argument for launching jenkins.war file causes an exception and recursively deletes all files from the current folder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Critical Critical
    • core
    • None
    • Issue has been found on OS X 10.7.2 by using the jenkins.war file downloaded from https://jenkins-ci.org/

      Starting Jenkins via the war file and supplying a path as argument for the application, causes an exception and recursively deletes all files from the current folder.

      Steps:
      1. Download the jenkins.war file from https://jenkins-ci.org/
      2. Start jenkins via: 'java -jar jenkins.war ./'
      3. Stop the application with Ctrl+C

      After step 3 check the current folder and notice that all files and sub folders have been deleted.

      The exception I get is:

      $ java -jar jenkins.war ./
      Running from: /Volumes/data/jenkins/jenkins.war
      webroot: $user.home/.jenkins
      [Winstone 2011/12/07 17:09:05] - Beginning extraction from war file
      [Winstone 2011/12/07 17:09:05] - Error initializing web application: prefix []
      java.util.zip.ZipException: error in opening zip file
      at java.util.zip.ZipFile.open(Native Method)
      at java.util.zip.ZipFile.<init>(ZipFile.java:127)
      at java.util.jar.JarFile.<init>(JarFile.java:135)
      at java.util.jar.JarFile.<init>(JarFile.java:99)
      at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:253)
      at winstone.HostConfiguration.<init>(HostConfiguration.java:73)
      at winstone.HostGroup.initHost(HostGroup.java:85)
      at winstone.HostGroup.<init>(HostGroup.java:45)
      at winstone.Launcher.<init>(Launcher.java:197)
      at winstone.Launcher.main(Launcher.java:398)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Main._main(Main.java:268)
      at Main.main(Main.java:96)

      [Winstone 2011/12/07 17:09:05] - HTTP Listener started: port=8080
      [Winstone 2011/12/07 17:09:05] - AJP13 Listener started: port=8009
      [Winstone 2011/12/07 17:09:05] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled

      Whatever argument is specified it has to be handled gracefully and should not result in deleting whole folders on disk. I think that's a critical issue and that I was lucky to run the war file from a newly created 'jenkins' sub folder. Otherwise I would have wiped out my whole data partition.

            Unassigned Unassigned
            whimboo Henrik Skupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: