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

Error when error message should be printed to stderr

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            veita Alexander Veit

            Dates

              Created:
              Updated:

              Slack

                Issue deployment