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

Ant task fx:deploy expectes all JARs to have a MANIFEST.MF and fails with NPE if at least one doesn't

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 8
    • Component/s: deploy
    • Environment:

      Windows 7
      JavaFX 2.2 build 19
      Java 1.7.0, update 06, build 22
      Ant 1.8.2

      Backports

        Description

        Seems fx:deploy is unhappy if at least one of the JARs specified with fx:resources doesn't contain a MANIFEST.MF. Here's a stack trace:

        path-to-build.xml:69: null
                at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:220)
                at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
                at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                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:390)
                at org.apache.tools.ant.Target.performTasks(Target.java:411)
                at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
                at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
                at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
                at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
                at org.apache.tools.ant.Main.runBuild(Main.java:809)
                at org.apache.tools.ant.Main.startAnt(Main.java:217)
                at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
                at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
        Caused by: java.lang.NullPointerException
                at com.sun.javafx.tools.packager.bundlers.BundleParams.getMainApplicationJar(BundleParams.java:390)
                at com.sun.javafx.tools.packager.bundlers.WinAppBundler.doValidate(WinAppBundler.java:59)
                at com.sun.javafx.tools.packager.bundlers.WinMsiBundler.validate(WinMsiBundler.java:90)
                at com.sun.javafx.tools.packager.bundlers.Bundler.get(Bundler.java:91)
                at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:450)
                at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:435)
                at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:215)
                ... 16 more

        I ran into this when using JavaFX with Guice. One of the runtime dependencies is javax.inject (http://search.maven.org/remotecontent?filepath=javax/inject/javax.inject/1/javax.inject-1.jar) which happens to not have a manifest file.

        Relevant OTN thread: https://forums.oracle.com/forums/thread.jspa?threadID=2425546

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                igor Igor Nekrestyanov (Inactive)
                Reporter:
                duke J. Duke (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported: