Monday Jun 27

Google +1 Button

Java Webstart

PDF Print E-mail
Thursday, 07 April 2011 10:09

Troubleshooting Java Webstart

Error : missing version response from server

Java Webstart IOException

Unable to launch the application"
"Unable to load resource: (http://<path to your jar>, <version>)"
" missing version response from server"

Source code in DownloadEngine package indicate that the downloadVersion and the versionString should not be null

missing version response from server

if  (downloadVersion == null && versionString != null) {
                throw new FailedDownloadException(href,
                        new IOException("missing version response from server"));

Sun Specifications :

For the version-based download protocol, all resources are uniquely identified by a URL/version-id pair. Thus, a JNLP Client can at any given time request a specific version of a resource located at a specific URL.

The JNLP Client issues an HTTP GET request that includes the specific version of the resource that it needs. The request includes the field version-id, which specifies the requested version.

For example, given the following jar element:
<jar href="" version="2.3+"/>
then the JNLP Client must issue the following HTTP GET request14:

The JNLP Client must examine the HTTP response status code and MIME type to determine if the result was successful. The valid responses are described in section 6.1.2. For the above jar element, theapplication/x-java-archive-diff MIME type cannot be returned. It can only be returned for incremental requests.

The version string used in the request is not necessarily exact, e.g., 2.3+. The Web server must specify the exact version-id of the resource that is returned in the response by setting the HTTP header field: x-java-jnlp-version-id. The exact version returned must be one that matches the requested version string.

If you are executing in your file system it looks like you can't use the version attribute
If you are using Maven to generate your JNLP use the outputJarVersions to prevent the creation of the versions attribute for the jar resources

Maven Webstart tutorial


BadFieldException BadFieldException[ The field <jnlp>href has an invalid value: app.jnlp,app.jnlp]

If you have executed multiple times your Webstart application it seems that you can have this message

Webstart fail to execute Webstart not executed but downloaded

If your Webstart application is not executed and the source code of your jnlp file is displayed you don't have the jnlp mime type defined in your web server. If you have an apache server, find the mime.type file and add the following line

application/x-java-jnlp-file   jnlp

or create an .htaccess

#Webstart support
addType application/x-java-jnlp-file   jnlp

Your jnlp files is now interpreted as a Webstart application and your browser is able to execute it as an application

Add comment

Security code