奇怪的 Java Webstart JNLP 异常

发布于 2024-12-04 15:58:42 字数 3908 浏览 1 评论 0原文

我有一个 java webstart 应用程序,它使用简单的 JNLP。 最近我在启动它时遇到了奇怪的问题。我以前从未遇到过这个问题,而且我很确定没有任何内容被修改:( 我在尝试启动此应用程序时收到此错误。

WARNING: <> tag is not closed correctly Exception parsing xml at line 33
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(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.downloadExtensions(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

正如您所看到的,它没有给出哪个标签有问题。据我所知;第33行没有问题。 它有一个简单的标签 session_token_here

更新: 这是 JNLP 文件;

  <jnlp spec="1.0+" codebase="https://MASKHOST:5467/"
 href="https://MASKHOST:5467/myjnlp.jnlp?session=rO0ABXNyADpjb20ud2lseS5pbnRyb3Njb3BlLnNwZWMuc2VydmVyLmJlYW5zLnNlc3Npb24uU2Vzc2lvblRva2Vu9ef0qNvv5yoMAAB4cHNyADBjb20ud2lseS5pc2VuZ2FyZC5wb3N0b2ZmaWNlLlBvc3RPZmZpY2VTcGVjaWZpZXL69Qzv1IsXcgwAAHhwdw4ABUxvY2FsAAVMb2NhbHh3CDWNLwuY3RbfeA%3d%3d&myauth=true">
 <information>
     <title>App Title</title>
     <vendor>Company</vendor>
     <homepage href="null"/>
     <description>Product Name</description>
     <icon href="https://MASKHOST:5467/images/logo.png"
 kind="default"/>   </information>   <security>
     <all-permissions/>   </security>   <update check="timeout"
 policy="always"/>   <resources>
     <jar
 href="https://MASKHOST:5467/product/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar"
 download="eager" main="false"/>
     <extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
 name="Component name"/>
     <extension href="https://MASKHOST:5467/jnlp/platformplugins.jsp"
 name="Core Plugins"/>
     <property name="osgi.instance.area" value="@user.home/Application
 Data/company/product/component"/>
     <property name="osgi.configuration.area"
 value="@user.home/Application Data/company/product/component"/>
     <property name="eclipse.product" value="osgiproductname"/>
     <java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true"
 href="http://java.sun.com/products/autodl/j2se"
 version="1.6*&1.6.0_05+"/>
     <property name="sun.java2d.noddraw" value="true"/>   </resources> 
 <application-desc
 main-class="org.eclipse.equinox.launcher.WebStartMain">
     <argument>-noexit</argument>
     <argument>-clean</argument>
     <argument>-loginhost</argument>
     <argument>MASKHOST</argument>
     <argument>-loginport</argument>
     <argument>6785</argument>
     <argument>-session</argument>

 <argument>rO0ABXNyADpjb20ud2lseS5pbnRyb3Njb3BlLnNwZWMuc2VydmVyLmJlYW5zLnNlc3Npb24uU2Vzc2lvblRva2Vu9ef0qNvv5yoMAAB4cHNyADBjb20ud2lseS5pc2VuZ2FyZC5wb3N0b2ZmaWNlLlBvc3RPZmZpY2VTcGVjaWZpZXL69Qzv1IsXcgwAAHhwdw4ABUxvY2FsAAVMb2NhbHh3CDWNLwuY3RbfeA==</argument>
     <argument>-myauth</argument>
     <argument>true</argument>
   </application-desc>
 </jnlp>

非常感谢任何帮助或进一步指导。

I am having a java webstart app which uses a simple JNLP.
Recently I am having wierd problems when launching it. I never had this problem before and I am pretty sure none of the content got modified either :(
I get this error when trying to launch this app.

WARNING: <> tag is not closed correctly Exception parsing xml at line 33
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(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.downloadExtensions(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

As you can see its not giving which tag has the problem. As far as I can see; there is no problem with line 33.
it has a simple tag <argument>session_token_here</argument>

Update:
This is the JNLP file;

  <jnlp spec="1.0+" codebase="https://MASKHOST:5467/"
 href="https://MASKHOST:5467/myjnlp.jnlp?session=rO0ABXNyADpjb20ud2lseS5pbnRyb3Njb3BlLnNwZWMuc2VydmVyLmJlYW5zLnNlc3Npb24uU2Vzc2lvblRva2Vu9ef0qNvv5yoMAAB4cHNyADBjb20ud2lseS5pc2VuZ2FyZC5wb3N0b2ZmaWNlLlBvc3RPZmZpY2VTcGVjaWZpZXL69Qzv1IsXcgwAAHhwdw4ABUxvY2FsAAVMb2NhbHh3CDWNLwuY3RbfeA%3d%3d&myauth=true">
 <information>
     <title>App Title</title>
     <vendor>Company</vendor>
     <homepage href="null"/>
     <description>Product Name</description>
     <icon href="https://MASKHOST:5467/images/logo.png"
 kind="default"/>   </information>   <security>
     <all-permissions/>   </security>   <update check="timeout"
 policy="always"/>   <resources>
     <jar
 href="https://MASKHOST:5467/product/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar"
 download="eager" main="false"/>
     <extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
 name="Component name"/>
     <extension href="https://MASKHOST:5467/jnlp/platformplugins.jsp"
 name="Core Plugins"/>
     <property name="osgi.instance.area" value="@user.home/Application
 Data/company/product/component"/>
     <property name="osgi.configuration.area"
 value="@user.home/Application Data/company/product/component"/>
     <property name="eclipse.product" value="osgiproductname"/>
     <java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true"
 href="http://java.sun.com/products/autodl/j2se"
 version="1.6*&1.6.0_05+"/>
     <property name="sun.java2d.noddraw" value="true"/>   </resources> 
 <application-desc
 main-class="org.eclipse.equinox.launcher.WebStartMain">
     <argument>-noexit</argument>
     <argument>-clean</argument>
     <argument>-loginhost</argument>
     <argument>MASKHOST</argument>
     <argument>-loginport</argument>
     <argument>6785</argument>
     <argument>-session</argument>

 <argument>rO0ABXNyADpjb20ud2lseS5pbnRyb3Njb3BlLnNwZWMuc2VydmVyLmJlYW5zLnNlc3Npb24uU2Vzc2lvblRva2Vu9ef0qNvv5yoMAAB4cHNyADBjb20ud2lseS5pc2VuZ2FyZC5wb3N0b2ZmaWNlLlBvc3RPZmZpY2VTcGVjaWZpZXL69Qzv1IsXcgwAAHhwdw4ABUxvY2FsAAVMb2NhbHh3CDWNLwuY3RbfeA==</argument>
     <argument>-myauth</argument>
     <argument>true</argument>
   </application-desc>
 </jnlp>

Any help or pointers to proceed further is greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

萌面超妹 2024-12-11 15:58:42
<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
 name="Component name/>

应该是..

<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
 name="Component name"/>

但是使用 JaNeLA 检查 JNLP 并修复发现的任何错误。

<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
 name="Component name/>

Should be..

<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
 name="Component name"/>

But check the JNLP usig JaNeLA and fix any errors identified.

余厌 2024-12-11 15:58:42

此行:

<java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true" href="http://java.sun.com/products/autodl/j2se" version="1.6*&1.6.0_05+"/>

有一个嵌入的 & ,应该像这样转义:

<java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true" href="http://java.sun.com/products/autodl/j2se" version="1.6*&1.6.0_05+"/>

第一行也有一个未转义的 &

以下行缺少结束双引号:

 <extension href="https://MASKHOST:5467/jnlp/productplugins.jsp" name="Component name/>

但这可能是编辑错误。

This line:

<java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true" href="http://java.sun.com/products/autodl/j2se" version="1.6*&1.6.0_05+"/>

has an embedded & which should be escaped like this:

<java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true" href="http://java.sun.com/products/autodl/j2se" version="1.6*&1.6.0_05+"/>

There is an unescaped & on the first line also.

The following line is missing a closing double quote:

 <extension href="https://MASKHOST:5467/jnlp/productplugins.jsp" name="Component name/>

but that may be a redaction typo.

乖乖公主 2024-12-11 15:58:42

在没有任何 JNLP 文件的情况下,我建议使用 Janela JNLP 验证器工具

In the absence of any JNLP file, I can suggest using the Janela JNLP validator tool

输什么也不输骨气 2024-12-11 15:58:42

也许您有 xml 注释或悬挂引号字符 " 之类的?

Maybe you've got an xml-comment or hanging quote character " or something?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文