Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095307

fx:jar produces corrupted manifest if named or unnamed param length exceeds 56 characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u9
    • Fix Version/s: 8u40
    • Component/s: deploy
    • Environment:

      NB any recent build, JDK7u8, Win, more configs may be affected

      Description

      In NetBeans a bug has been filed describing jarsigner failures when building FX Application projects with parameters (named or unnamed):

      http://netbeans.org/bugzilla/show_bug.cgi?id=222091

      NB QA discovered the issue manifests itself only if the length of at least one of the supplied parameters exceeds 56 chars. We discovered that the problem then is in the corrupted jar manifest produced by <fx:jar>.
      Example of a AFAICT correct manifest with one named and one unnamed parameter, length of both 56 chars:

      Manifest-Version: 1.0
      JavaFX-Parameter-Name-1: bmFtZWQ=
      implementation-vendor: psomol
      JavaFX-Version: 2.2
      implementation-title: JavaFXApplication6
      implementation-version: 1.0
      JavaFX-Argument-1: YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWF
       hYWFhYWFhYWFhYWFhYWFhYWE=
      JavaFX-Application-Class: javafxapplication6.JavaFXApplication6
      JavaFX-Class-Path: lib/JavaLibrary1.jar
      JavaFX-Parameter-Value-1: YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
       YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=
      Created-By: JavaFX Packager
      Main-Class: com/javafx/main/Main

      Now the corrupted one, obtained by prolonging the parameters by 5 more chars in the same project:

      Manifest-Version: 1.0
      JavaFX-Parameter-Name-1: bmFtZWQ=
      JavaFX-Version: 2.2
      implementation-vendor: psomol
      implementation-title: JavaFXApplication6
      implementation-version: 1.0
      JavaFX-Argument-1: YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWF
       hYWFhYWFhYWFhYWFhYWFhYWFi
      Y2RlZg==
      JavaFX-Application-Class: javafxapplication6.JavaFXApplication6
      JavaFX-Class-Path: lib/JavaLibrary1.jar
      JavaFX-Parameter-Value-1: YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
       YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFi
      Y2RlZg==
      Created-By: JavaFX Packager
      Main-Class: com/javafx/main/Main

      Note that the param strings got broken and trailing parts of them ("Y2RlZg==") are now misplaced as identifiers. The consequence is the jarsigner failure as reported in NB bugreport.

        Attachments

          Activity

            People

            Assignee:
            dcherepanov Dmitry Cherepanov
            Reporter:
            psomol Petr Somol (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: