Search code examples
javajbossejb-3.0jboss7.xjava-web-start

Java Webstart error when launching


I have an EJB 3.0 project using webstart that I am trying to deploy to JBoss AS 7.1.1 as a WAR. I can get to the html page just fine, but when I click the webstart link it tries to download JRE 1.7 from http://java.sun.com and pops up with this error:

"AutoDL?BundleId=68742" on java.sun.com is not a Java installer.

Here is the directory structure of my war:

root of war(dir)
-->GrahamsProjClient-webstart.jnlp
-->GrahamsProjStartAppPage.html
-->app(dir)
    -->GrahamsProjClient.jar(The actual client project)
-->META-INF(dir)
    -->context.xml(blank file)
    -->MANIFEST.MF
-->WEB-INF(dir)
    -->web.xml
    -->classes(dir) contains my compiled servlet
    -->lib(dir)
        -->jboss-servlet-api_3.0_spec-1.0.0.Final.jar
        -->jnlp-servlet.jar

Here are links to the important files from the war:

GrahamsProjClient-webstart.jnlp --> http://pastebin.com/zwkm1zz3

<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="$$codebase">
 <information>
     <title>Grahams Project</title>
     <vendor>Graham</vendor>
     <description>desc</description>
 </information>
 <resources>
   <j2se version="1.6"/>
   <jar href="GrahamsProjClient.jar"/>
 </resources>
 <application-desc/>
</jnlp>

GrahamsProjStartAppPage.html --> http://pastebin.com/EXu8Z5dZ

web.xml --> http://pastebin.com/KK3fPPY9

GrahamsProjServlet.java --> http://pastebin.com/iC9JDiTL

What could be causing this?


Solution

  • After fiddling with it for a while I ran into the solution. In the GrahamsProjStartAppPage.html the deployJava.createWebStartLaunchButton() command needs to have 1.6.0+ instead of 1.6.0. So the html file now looks like this:

    <body>
    <!-- ... -->
    <script src=
      "http://www.java.com/js/deployJava.js"></script>
    <script>
        // using JavaScript to get location of JNLP
        // file relative to HTML page
        var dir = location.href.substring(0,
            location.href.lastIndexOf('/')+1);
        //var url = dir + "GrahamsProjClient-webstart.jnlp";
        var url = "http://127.0.0.1:8080/GrahamsProjClient/GrahamsProjClient-webstart.jnlp"
        deployJava.createWebStartLaunchButton(url, '1.6.0+'); //changed from 1.6.0 to 1.6.0+
    </script>
    <!-- ... -->
    </body>