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

Assertion error if output application already exists

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Darwin Alans-iMac 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64


      A DESCRIPTION OF THE PROBLEM :
      Packager fails with AssertionError if bundled application already exists.

      Bug report requested by Chris Benson.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Go to modules/jdk.packager/src/test/examples/antswingapp

      Run ant twice.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      BUILD FAILED
      /Volumes/A/JDK/rt/modules/jdk.packager/src/test/examples/antswingapp/build.xml:52: java.lang.AssertionError: Duplicate entry!
      at jdk.jlink/jdk.tools.jlink.builder.DefaultImageBuilder.lambda$storeFiles$1(DefaultImageBuilder.java:176)
      at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
      at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
      at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1492)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
      at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430)
      at jdk.jlink/jdk.tools.jlink.builder.DefaultImageBuilder.storeFiles(DefaultImageBuilder.java:171)
      at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.storeFiles(ImagePluginStack.java:498)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.writeImage(ImageFileCreator.java:166)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.create(ImageFileCreator.java:100)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask$ImageHelper.retrieve(JlinkTask.java:768)
      at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.operate(ImagePluginStack.java:206)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:318)
      at jdk.jlink/jdk.tools.jlink.internal.Jlink.build(Jlink.java:321)
      at jdk.jlink/jdk.tools.jlink.internal.packager.AppRuntimeImageBuilder.build(AppRuntimeImageBuilder.java:134)
      at jdk.packager/jdk.packager.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:351)
      at jdk.packager/com.oracle.tools.packager.mac.MacAppBundler.doBundle(MacAppBundler.java:359)
      at jdk.packager/com.oracle.tools.packager.mac.MacAppBundler.execute(MacAppBundler.java:437)
      at jdk.packager/com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:371)
      at jdk.packager/com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:348)
      at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:310)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:435)
      at org.apache.tools.ant.Target.performTasks(Target.java:456)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
      at org.apache.tools.ant.Main.runBuild(Main.java:853)
      at org.apache.tools.ant.Main.startAnt(Main.java:235)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
      Caused by: java.nio.file.FileAlreadyExistsException: output/Test.app/Contents/PlugIns/Java.runtime/Contents/Home/lib/libprefs.dylib
      at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
      at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
      at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:215)
      at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
      at java.base/java.nio.file.Files.newOutputStream(Files.java:218)
      at java.base/java.nio.file.Files.copy(Files.java:3071)
      at jdk.jlink/jdk.tools.jlink.builder.DefaultImageBuilder.writeEntry(DefaultImageBuilder.java:439)
      at jdk.jlink/jdk.tools.jlink.builder.DefaultImageBuilder.accept(DefaultImageBuilder.java:399)
      at jdk.jlink/jdk.tools.jlink.builder.DefaultImageBuilder.lambda$storeFiles$1(DefaultImageBuilder.java:173)
      ... 41 more


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            • Assignee:
              vdrozdov Victor Drozdov (Inactive)
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: