Fatal: Read Error: Could not read or parse the JNLP file

Jiri Vanek jvanek at redhat.com
Tue Feb 11 09:03:49 PST 2014


Ok. Here is patch which make this run. If you need to use this, you can make an build on your own.

Generally - this adds support for following 301,2,3,7,8  redirect. It is good thing, nd will be proposed to head. However will be probably disabled by default, as it can be dangerous.
           - there is bug in current handling of jnlp's href attribute. See :
--- a/netx/net/sourceforge/jnlp/Launcher.java	Tue Feb 11 09:20:36 2014 -0500
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Tue Feb 11 17:57:37 2014 +0100
@@ -466,6 +466,8 @@
                  haveHref = true;
              }

+isLocal=true;
+
              if (isLocal && haveHref) {
                  file = new JNLPFile(file.getSourceLocation(), parserSettings);
              }

this is hack just for you This needs to be fixed as separate patch.

And - not generally -

-- a/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java	Tue Feb 11 09:20:36 2014 -0500
+++ b/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java	Tue Feb 11 17:57:37 2014 +0100
@@ -236,8 +236,8 @@
                      continue;
                  }

-                VerifyResult result = verifyJar(localFile);
-
+                //VerifyResult result = verifyJar(localFile);
+                VerifyResult result = VerifyResult.SIGNED_OK;
                  if (result == VerifyResult.UNSIGNED) {
                      unverifiedJars.add(localFile);
                  } else if (result == VerifyResult.SIGNED_NOT_OK) {


I had to disable all security checks. I still don't know if it result of of jars being downlaoded from redirected location.
I have suspicions that the siganture is REALLY WRONG. Are you sure you are downloading application from correct source? I had noted a lot of classnotfound errors on startup anyway - but App wos working fine.

so again - are you sure you know what are you launching?

best regards from ITW
   J.

On 02/11/2014 02:38 PM, Jiri Vanek wrote:
> On 02/11/2014 01:30 PM, Jiri Vanek wrote:
>> On 02/05/2014 09:36 AM, Min Hua wrote:
>>> When executing
>>> http://java.net/projects/electric/downloads/download/electric.jnlp
>>> always get the following errors:
>>
>> hhmhm, both
>>
>> http://java.net/projects/electric/downloads/download/electric.jnlp
>> http://java.net/projects/electric/downloads/download/WebStartFiles/electricAnt.jnlp
>>
>> are valid XML and even had have the same issue.
>>
>> This seems to me like same issue - http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1635
>>
>> With difference that after convert (suggested workarround) , the ITW parse JNLP , but die later.
>>
>> I'm in temptation to add switch to javaws, which will allow to select encoding directly.
>>
>> You may try to play around the iconv worakround, and I may try to find soemthing more suitable in ITW to deal with this kind of issue.
>
> ok. This is even more tricky.
>
> The site is full of 302 redirections.
> Both for jnlp - the final one (fourth!) is https://java.net/downloads/electric/WebStartFiles/electricAnt.jnlp
> However also jars are burned under several layers of redirections, so the app did not start anyway. This is bug and needs to be fixed.
>
> J.
>>
>> J.
>>>
>>> net.sourceforge.jnlp.LaunchException: Fatal: Read Error: Could not read or
>>> parse the JNLP file. You can try to download this file manually and send it as
>>> bug report to IcedTea-Web team.
>>> at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:472)
>>> at net.sourceforge.jnlp.Launcher.launch(Launcher.java:278)
>>> at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:211)
>>> at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:53)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:177)
>>> Caused by: net.sourceforge.jnlp.ParseException: Invalid XML document syntax.
>>> at net.sourceforge.jnlp.Parser.getRootNode(Parser.java:1312)
>>> at net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:206)
>>> at net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:190)
>>> at net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:175)
>>> at net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:161)
>>> at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:464)
>>> ... 5 more
>>> Caused by: net.sourceforge.nanoxml.XMLParseException: XML Parse Exception
>>> during parsing of a html element at line 1: Expected: /
>>> at net.sourceforge.nanoxml.XMLElement.expectedInput(XMLElement.java:1126)
>>> at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:986)
>>> at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:967)
>>> at net.sourceforge.nanoxml.XMLElement.parseFromReader(XMLElement.java:512)
>>> at net.sourceforge.nanoxml.XMLElement.parseFromReader(XMLElement.java:464)
>>> at net.sourceforge.jnlp.Parser.getRootNode(Parser.java:1308)
>>> ... 10 more
>>>
>>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: makeItRunDirty.patch
Type: text/x-patch
Size: 8204 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140211/8964f949/makeItRunDirty-0001.patch 


More information about the distro-pkg-dev mailing list