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

Test tools/jpackage/share/jdk/jpackage/tests/AppVersionTest.java fails - possibly corrupt classfile

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 18, 19
    • Fix Version/s: 19
    • Component/s: tools
    • Subcomponent:
    • CPU:
      aarch64
    • OS:
      os_x

      Description

      Failed to parse class file: /java.desktop/javax/swing/plaf/basic/BasicToolBarUI.class from resource of type jdk.tools.jlink.internal.ArchiveEntryResourcePoolEntry
      java.lang.IllegalArgumentException
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:290)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:208)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:194)
      at jdk.jlink/jdk.tools.jlink.internal.plugins.AbstractPlugin.newClassReader(AbstractPlugin.java:90)
      at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.lambda$transform$1(StripJavaDebugAttributesPlugin.java:62)
      at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.lambda$transformAndCopy$0(ResourcePool.java:112)
      at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
      at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
      at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
      at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.transformAndCopy(ResourcePool.java:111)
      at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.transform(StripJavaDebugAttributesPlugin.java:54)
      at jdk.jlink/jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin.transform(DefaultStripDebugPlugin.java:76)
      at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.visitResources(ImagePluginStack.java:262)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:184)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.writeImage(ImageFileCreator.java:163)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.create(ImageFileCreator.java:100)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask$ImageHelper.retrieve(JlinkTask.java:871)
      at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.operate(ImagePluginStack.java:194)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:436)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)
      at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:55)
      at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:66)

      which indicates an unknown constant pool entry was encountered when processing the classfile.

      There is a further error, though it is unclear if it is independent of the above:

      [00:45:07.594] jdk.jpackage.internal.PackagerException: Bundler Mac PKG Package skipped because of a configuration problem: The first number in an app-version cannot be zero or negative.
      Advice to fix: Set a compatible 'app-version' value. Valid versions are one to three integers separated by dots.
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:701)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
      at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
      at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
      Caused by: jdk.jpackage.internal.ConfigException: The first number in an app-version cannot be zero or negative.
      at jdk.jpackage/jdk.jpackage.internal.MacAppBundler.doValidate(MacAppBundler.java:124)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.validate(AppImageBundler.java:70)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.validateAppImageAndBundeler(MacBaseInstallerBundler.java:154)
      at jdk.jpackage/jdk.jpackage.internal.MacPkgBundler.validate(MacPkgBundler.java:590)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:688)
      ... 3 more
      Caused by: java.lang.IllegalArgumentException: The first number in an app-version cannot be zero or negative.
      at jdk.jpackage/jdk.jpackage.internal.CFBundleVersion.of(CFBundleVersion.java:50)
      at jdk.jpackage/jdk.jpackage.internal.MacAppBundler.doValidate(MacAppBundler.java:122)
      ... 7 more

      If there is underlying image/classfile corruption then this could have the same underlying cause as JDK-8281241.

        Attachments

        1. baseline.log
          20 kB
        2. diffoscope-output.diff
          10 kB
        3. extracted_LocaleNames_fi.class
          66 kB
        4. failure.log
          2.27 MB
        5. jdk.localedata.jmod
          10.81 MB
        6. LocaleNames_fi.class
          66 kB
        7. LocaleNames_fi.java
          59 kB
        8. LocaleNames_fi-1.class
          66 kB
        9. StripDebugJmod.java
          1 kB
        10. StripDebugJmodWithZip.java
          1 kB

          Issue Links

            Activity

              People

              Assignee:
              sundar Sundararajan Athijegannathan
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: