jldubz / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 0 forks source link

The field <jnlp>codebase has an invalid value in the signed launch file: #178

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When running qz-print 1.7.0 on Windows XP or Windows 7 and Java 6 Update 38, 
the following message is displayed:

exception: The field <jnlp>codebase has an invalid value in the signed launch 
file: ..
BadFieldException[ The field <jnlp>codebase has an invalid value in the signed 
launch file: .,.]
    at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedLaunchDescHelper(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedLaunchDesc(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)
Exception: BadFieldException[ The field <jnlp>codebase has an invalid value in 
the signed launch file: .,.]

Status:  May be related to Issue 177.  Under investigation.

Original issue reported on code.google.com by tres.fin...@gmail.com on 12 Nov 2013 at 1:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The recommended fix is to upgrade to qz-print 1.8.0 and Java 6 Update 45.

JNLP support between different JRE versions varies and causes these issues.  
Java 6 Update 38 will work if recompiled with JNLP completely removed from JAR.

-Tres

Original comment by tres.fin...@gmail.com on 17 Dec 2013 at 8:00

GoogleCodeExporter commented 9 years ago
Due to the requirements of a client, I was able to investigate this further.  
Here is the information:

If using the new deployJava.js to detect the Java version (sample.html, 
starting on line 19), you'll have to change line 29:
Find:
> parameters['jnlp_href'] = 'jre6/qz-print_jnlp.jnlp';

Replace with:
> delete parameters['jnlp_href'];

This is because Java 6 Update 29 is incompatible with the JNLP parameters we 
use.  This line effectively turns JNLP off.  This will allow the applet to load 
with Java 6 Update 29 and qz-print 1.8.0.

You may choose to tweak the detection parameters to accommodate for specific 
Java 6 builds.

Original comment by tres.fin...@gmail.com on 28 Jan 2014 at 2:30

GoogleCodeExporter commented 9 years ago
Issue 193 has been merged into this issue.

Original comment by tres.fin...@gmail.com on 28 Jan 2014 at 2:32

GoogleCodeExporter commented 9 years ago
Thanks

I have now 
1) the qz-print_jnlp.jnlp on the server
2)this code (coming from sample.html)  at the beginning of the page which prints

<script type="text/javascript"> 
deployQZ(); 
function deployQZ() {
    var attributes = {id: "qz", code:'qz.PrintApplet.class', 
    archive:'qz-print.jar', width:1, height:1};
    var parameters = {jnlp_href: 'qz-print_jnlp.jnlp', 
    cache_option:'plugin', disable_logging:'false', 
    initial_focus:'false'};
    if (deployJava.versionCheck("1.7+") == true) {}
    else if (deployJava.versionCheck("1.6+") == true) {
        attributes['archive'] = './qz-print.jar';
        parameters['jnlp_href'] = './qz-print_jnlp.jnlp';
    }
    deployJava.runApplet(attributes, parameters, '1.5');
}

I hop it will work

Jean-Pierre

Original comment by ltr...@gmail.com on 1 Feb 2014 at 4:47

GoogleCodeExporter commented 9 years ago
If using the new deployJava.js to detect the Java version (sample.html, 
starting on line 19), you'll have to change line 29:
Find:
> parameters['jnlp_href'] = 'jre6/qz-print_jnlp.jnlp';

Replace with:
> delete parameters['jnlp_href'];

-Tres

Original comment by tres.fin...@gmail.com on 1 Feb 2014 at 5:49

GoogleCodeExporter commented 9 years ago
The problem is different versions of java react differently.  Java 6 can live 
without it, Java 7 cannot.  Please test thoroughly.

Original comment by tres.fin...@gmail.com on 1 Feb 2014 at 5:50

GoogleCodeExporter commented 9 years ago

Original comment by tres.fin...@gmail.com on 26 Aug 2014 at 12:32