JNLParseException [ 无法解析启动文件.第 56 行出错.] [英] JNLParseException [ Could not parse launch file. Error at line 56.]

查看:29
本文介绍了JNLParseException [ 无法解析启动文件.第 56 行出错.]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 jnlp 和 deployjava.js 加载小程序,但我无法解决这个问题.Stacktrace 如下:

I am trying to load an applet using jnlp and deployjava.js but I could not get my head around this problem .Stacktrace as follows:

JNLParseException[ Could not parse launch file. Error at line 56.]
    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.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
    at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
    at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
    at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

这是我的 jnlp 文件:

Here's my jnlp file:

<%-- 
    Document   : render
    Created on : 18 May, 2012, 2:16:37 PM
    Author     : Piyush
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String protocol = request.getScheme();
    String domain = request.getServerName();
    String port = Integer.toString(request.getServerPort());
    String a = protocol + "://" + domain + ":" + port + path;
    path = protocol + "://" + domain + ":" + port + path + "/";
    String invitedUnder=request.getParameter("invitedUnder");
%>

<%@page contentType="application/x-java-jnlp-file" pageEncoding="UTF-8"%>
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="<%=path%>" href="">
    <information>
        <title>Enrollment</title>
        <vendor>Piyush</vendor>
    </information>
    <resources>
        <!-- Application Resources -->
        <j2se version="1.6+"
              href="http://java.sun.com/products/autodl/j2se" />
        <jar href="jnlp/FingerPrint_fat1.jar" main="true" />

    </resources>
    <applet-desc 
        name="Enrollment Applet"
        main-class="ui.InvitationApplet"
        width="600"
        height="600">
        <param name="separate_jvm" value="true" />
        <param name="firstName" value="${firstName}"/>
        <param name="lastName" value="${lastName}"/>
        <param name="loginId" value="${loginId}"/>
        <param name="roleId" value="${roleId}"/>
        <param name="urlCode" value="${urlCode}"/>
        <param name="databaseURL" value="${databaseURL}"/>
        <param name="userName" value="${userName}"/>
        <param name="createdBy" value="${createdBy}"/>
        <param name="password" value="root"/>    
        <param name="driverName" value="com.mysql.jdbc.Driver"/>
        <param name="path" value="<%=a%>"/>
        <param name="invitedUnder" value="${invitedUnder}"/>
    </applet-desc>
    <update check="background"/>
</jnlp>            

我不明白出了什么问题,因为前一天一切正常.我使用的是 SpringMVC 3.2 版本和 Java 7.

I don't get whats gone wrong because the day before everything was working fine.I am using SpringMVC 3.2 release and Java 7.

推荐答案

href="" href 应明确设置为有效路径,或完全省略.

href="" The href should be explicitly set to a valid path, or omitted entirely.

务必使用 JaNeLA 验证(典型)最终产品.

Be sure to validate the (typical) end product with JaNeLA.

这篇关于JNLParseException [ 无法解析启动文件.第 56 行出错.]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆