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

tools/jpackage/share/AddLauncherTest.java#id1 PackagerException: jlink failed with ... IllegalArgumentException

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      aarch64
    • OS:
      os_x

      Description

      The following test failed in the JDK19 CI:

      tools/jpackage/share/AddLauncherTest.java#id1

      Here's a snippet from the log file:

      [14:57:36.535] Building DMG package for AddLauncherTest.
      [14:57:43.115] Command [PID: -1]:
          jlink --output /var/folders/vc/dxpzs4m54c7dx7gfdy200xyr0000gp/T/jdk.jpackage16254815033901119088/images/image-5265981603133877016/AddLauncherTest.app/Contents/runtime/Contents/Home --module-path /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-19+20-1303/macosx-aarch64.jdk/jdk-19.jdk/Contents/Home/jmods --add-modules jdk.management.jfr,java.rmi,jdk.jdi,jdk.charsets,jdk.xml.dom,java.xml,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,java.sql.rowset,jdk.sctp,jdk.jsobject,java.smartcardio,jdk.unsupported,jdk.jlink,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,java.sql,jdk.incubator.vector,java.logging,java.transaction.xa,java.xml.crypto,jdk.jfr,jdk.crypto.cryptoki,jdk.net,jdk.random,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.internal.jvmstat,jdk.incubator.foreign,java.instrument,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,java.management.rmi,jdk.jpackage,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
      [14:57:43.116] Output:
          WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector
      Error: java.lang.IllegalArgumentException
      java.io.IOException: java.lang.IllegalArgumentException
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
      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)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.prepareAppBundle(MacBaseInstallerBundler.java:167)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:82)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:579)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
      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: java.lang.IllegalArgumentException
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:294)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:212)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:198)
      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:1919)
      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)
      ... 19 more

      [14:57:43.116] Returned: 1

      [14:57:43.116] jdk.jpackage.internal.PackagerException: jlink failed with: WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector
      Error: java.lang.IllegalArgumentException
      java.io.IOException: java.lang.IllegalArgumentException
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
      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)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.prepareAppBundle(MacBaseInstallerBundler.java:167)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:82)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:579)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
      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: java.lang.IllegalArgumentException
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:294)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:212)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:198)
      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:1919)
      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)
      ... 19 more

      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:199)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.prepareAppBundle(MacBaseInstallerBundler.java:167)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:82)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:579)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
      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)
      [14:57:43.117] jdk.jpackage.internal.PackagerException: jdk.jpackage.internal.PackagerException: jlink failed with: WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector
      Error: java.lang.IllegalArgumentException
      java.io.IOException: java.lang.IllegalArgumentException
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
      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)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.prepareAppBundle(MacBaseInstallerBundler.java:167)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:82)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:579)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
      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: java.lang.IllegalArgumentException
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:294)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:212)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:198)
      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:1919)
      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)
      ... 19 more

      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:95)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:579)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
      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.PackagerException: jlink failed with: WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector
      Error: java.lang.IllegalArgumentException
      java.io.IOException: java.lang.IllegalArgumentException
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
      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)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.prepareAppBundle(MacBaseInstallerBundler.java:167)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:82)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:579)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
      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: java.lang.IllegalArgumentException
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:294)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:212)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:198)
      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:1919)
      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)
      ... 19 more

      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:199)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.prepareAppBundle(MacBaseInstallerBundler.java:167)
      at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:82)
      ... 5 more
      [14:57:43.133] TRACE: exec: Done. Exit code: 1
      [14:57:43.136] ERROR: Expected [0]. Actual [1]: Check command [/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-19+20-1303/macosx-aarch64.jdk/jdk-19.jdk/Contents/Home/bin/jpackage --input ./test/input --dest ./test/output --name AddLauncherTest --type dmg --main-jar hello.jar --main-class Hello --arguments Duke --arguments is --arguments the --arguments King --description "AddLauncherTest Description" --add-launcher Baz2=./test/Baz2.0.properties --add-launcher foo=./test/foo.0.properties --add-launcher Bar=./test/Bar.0.properties -J-Djlink.debug=true --verbose](31) exited with 0 code
      [14:57:43.137] [ FAILED ] AddLauncherTest.test; checks=45

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: