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

"javapackager --add-modules ..." throws Exception: jdk.tools.jlink.plugin.PluginException: java.lang.module.ResolutionException: Module ... not found

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • deploy
    • 9
    • os_x
    • Verified

      [Mac Developer Build: 10/05/2016]

      Steps to reproduce

      Modular Jars com.shape.serviceinterface.jar,com.shape.serviceprovider.circle.jar,com.shape.serviceprovider.rectangle.jar are available in attachment, source codes of these jars are available in src.zip


      1. try to execute the following CLI at mac command line.

      javapackager -deploy -verbose -outdir outdir -outfile test -native pkg --module-path /export/home/gtee/ramesh/modservicejars --module com.shape.serviceinterface/com.shape.serviceinterface.ShapeMainClass -name ListServiceProvidersTestManual --add-modules com.shape.serviceprovider.circle,com.shape.serviceprovider.rectangle

      Here is the log of above command

      Building PKG package for ListServiceProvidersTestManual
      "Adding modules: [com.shape.serviceprovider.circle,com.shape.serviceprovider.rectangle, com.shape.serviceinterface] to runtime image."
      Exception: jdk.tools.jlink.plugin.PluginException: java.lang.module.ResolutionException: Module com.shape.serviceprovider.circle,com.shape.serviceprovider.rectangle not found
      Config files are saved to /var/folders/sx/mb704jwn5b36y_pjsg1vfqjm001wjw/T/fxbundler1730878722654511600/macosx. Use them to customize package.
      Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: Bundler "PKG Installer" (pkg) failed to produce a bundle.
              at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(jdk.packager/PackagerLib.java:373)
              at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(jdk.packager/PackagerLib.java:348)
              at com.sun.javafx.tools.packager.Main.main(jdk.packager/Main.java:486)

      EXPECTED OUTPUT: Bundling should happen without any issues.

      2. For verification executed with java command with same module-path and successfully executed the command

      java --module-path /export/home/gtee/ramesh/modservicejars --add-modules com.shape.serviceprovider.circle,com.shape.serviceprovider.rectangle -m com.shape.serviceinterface/com.shape.serviceinterface.ShapeMainClass

      Here is the log of above output
      This is Circle
      This is Rectangle

            cbensen Chris Bensen (Inactive)
            rgangadhar Ramesh Gangadhar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: