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

Extension JNLP file is not generated properly (<fx:deploy>, <resources> tag is not closed correctly).

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • 7u13
    • deploy
    • None


      I need to make a second JNLP file for already signed JARs, like BouncyCastle.

      I generate it using the extension="true" attribute:


      <fx:deploy extension="true" outdir="${application.dist}" outfile="BouncyCastle">
            <fx:resources>
                        <fx:fileset dir="${application.dist}" includes="lib/bc*.jar"/>
            </fx:resources>
      </fx:deploy>



      The generated JNLP looks like:

      <?xml version="1.0" encoding="utf-8"?>
      <jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="BouncyCastle.jnlp">
        <information>
          <title>Sample JavaFX Application</title>
          <vendor>Unknown vendor</vendor>
          <description>Sample JavaFX 2.0 application.</description>
        </information>
        <resources> <jar href="lib/bcmail-jdk16-1.46.jar" size="501462" download="eager" />
        <resources> <jar href="lib/bcprov-jdk16-1.46.jar" size="1876535" download="eager" />
        </resources>
      <component-desc/>
        <update check="background"/>
      </jnlp>


      Notice the duplicate <resources> tag.

      When parsing I get the following exception:

      JNLP Parse Exception: WARNING: <resources> tag is not closed correctly Exception parsing xml at line 8
      JNLParseException[ Startdatei konnte nicht geparst werden. Fehler in Zeile 8.]
      at com.sun.javaws.jnl.XMLFormat.throwNewException(Unknown Source)
      at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      at com.sun.javaws.LaunchDownload._downloadExtensionsHelper(Unknown Source)
      at com.sun.javaws.LaunchDownload.downloadExtensionsHelper(Unknown Source)
      at com.sun.javaws.LaunchDownload.getCachedExtensions(Unknown Source)
      at com.sun.javaws.LaunchDownload.isInCache(Unknown Source)
      at com.sun.javaws.LaunchDownload.isInCache(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.ensureAllJnlpFilesAreAvailable(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      preloader: Added pending event 2: ErrorEvent[url=file:/C:/Work/sam/trunk/G3Link/source/Communicator/impl/target/dist/Communicator.jnlp label=Startdatei konnte nicht geparst werden. Fehler in Zeile 8. cause=Startdatei konnte nicht geparst werden. Fehler in Zeile 8.
      basic: Ausnahme: Startdatei konnte nicht geparst werden. Fehler in Zeile 8..
      ExitException[ 3]JNLParseException[ Startdatei konnte nicht geparst werden. Fehler in Zeile 8.]
      at sun.plugin2.applet.JNLP2Manager.ensureAllJnlpFilesAreAvailable(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
      at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

            janvalenta Jan Valenta (Inactive)
            cschudtjfx Christian Schudt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: