Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9595

Error when error message should be printed to stderr

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.2.0
    • None
    • bin
    • None

    Description

      RunJar contains the lines

        if (!file.exists() || !file.isFile()) {
          System.err.println("Not a valid JAR: " + file.getCanonicalPath());
          System.exit(-1);
        }
      

      This code fails with

      Exception in thread "main" java.io.IOException: Invalid argument
      at java.io.WinNTFileSystem.canonicalize0(Native Method)
      at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:414)
      at java.io.File.getCanonicalPath(File.java:589)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:85)

      A possible fix is

        if (!file.exists() || !file.isFile()) {
          System.err.println("Not a valid JAR: " + file);
          System.exit(-1);
        }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              veita Alexander Veit
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: