Apache Tomcat Maven Plugin
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-104

Running java -jar from a parent directory causes a Zip file error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-1
    • Fix Version/s: 2.0-beta-1
    • Component/s: tomcat7
    • Labels:
      None
    • Environment:
      Mac OSX 10.6.8

      Description

      If you attempt to run the executable jar rather than from the directory the jar file is in you get an error with Zip extraction.

      java -jar ./target/smapi-1.0-war-exec.jar
      Exception in thread "main" 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:72)
      at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72)
      at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
      at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:55)
      at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
      at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:132)
      at org.apache.tomcat.maven.runner.Tomcat7Runner.getContextXml(Tomcat7Runner.java:229)
      at org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:208)
      at org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:144)

        Activity

        Keith Corbin created issue -
        Olivier Lamy (*$^¨%`£) made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Olivier Lamy (*$^¨%`£) made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            Keith Corbin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development