Link to home
Start Free TrialLog in
Avatar of steve_bagnall
steve_bagnall

asked on

Web Start reporting <gapdataclient.jar> missing when it's not

Hi,

I have set up a web server for installing Java applications using WebStart.  However, when I try and launch a particulat application I get the following error in WebStart:


An error occurred while launching/running the application.

Category: Launch File Error

The following required field is missing from the launch file: <jnlp>(<application-desc>|<applet-desc>|<installer-desc>|<component-desc>)



The Stack Trace follows as does the launch File as per WebStart.  As you will see an application-desc element does exist?  Any ideas?


MissingFieldException[ The following required field is missing from the launch file: <jnlp>(<application-desc>|<applet-desc>|<installer-desc>|<component-desc>)]
      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.Main.launchApp(Unknown Source)
      at com.sun.javaws.Main.main(Unknown Source)





<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for Gap Analysis Application -->
<jnlp spec="1.5+" codebase="http://localhost/WebStart" href="jnlp/gapanalysis.jnlp">  
      <information>    
            <title>Gap Analysis Application</title>
            <vendor>Churchill China (UK) Ltd</vendor>
            <homepage href="docs/help.html" />
            <description>Gap Analysis Application</description>
            <description kind="short">Client-Server application for recording and viewing product placement marketing data.</description>
          <icon href="assets/gap_logo_48_48.gif" />
          <icon kind="splash" href="assets/gap_logo_48_48.gif" />
          <offline-allowed />
          <association>
                <mime-type="application-x/gapanalysis-file"/>
                <extensions="gapanalysis"/>    
          </association>    
          <shortcut online="false">
                <desktop />
                <menu submenu="Churchill China Applications" />
          </shortcut>  
   </information>  
   
   <information os="linux">      
            <title>Gap Analysis on Linux</title>
            <homepage href="docs/linuxhelp.html">  
      </information>  
      <security>
            <all-permissions/>  
      </security>  
      <resources>    
            <j2se version="1.4.2+" java-vm-args="-esa -Xnoclassgc" />    
            <jar href="jars/gapdataclient.jar"/>  
      </resources>  
      <application-desc main-class="com.churchillchina.gapanalysis.GapDataClient" />
</jnlp>


Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

It thinks the <application-desc> tag is missing...

Try removing the

   <information os="linux">      

block...I've never seen one of those :-/
SOLUTION
Avatar of Dejan Pažin
Dejan Pažin
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> <homepage href="docs/linuxhelp.html">  does not have a closing tag

WELL SPOTTED :-)

dejanpazin deserves the points, just for spotting that :-D

My eyes went funny looking for unclosed tags ;-)

hehehe

And also, you have defined association tag incorrectly (also the sun site has that bug, if you copied that, see this: http://joust.kano.net/weblog/archive/2004/10/)

This is the correct association tag:
<association mime-type="application-x/gapanalysis-file" extensions="gapanalysis" />

>> WELL SPOTTED :-)

thx!
Avatar of steve_bagnall
steve_bagnall

ASKER

dejanpazin,

Thanks that's done it .. now I get this, any ideas?



An error occurred while launching/running the application.

Title: Gap Analysis Application
Vendor: Churchill China (UK) Ltd
Category: Download Error

Unable to load resource: http://localhost/WebStart/jnlp/gapdataclient.jnlp




JNLPException[category: Download Error : Exception: java.io.IOException: HTTP response 404 : LaunchDesc: null ]
      at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
      at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
      at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
      at com.sun.javaws.Launcher.downloadResources(Unknown Source)
      at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
      at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
http://localhost/WebStart in the jnlp tag should be the location the app is downloaded from...
The file's here

c:\wwwroot\webstart\jnlp\gapanalysis.jnlp

and the tags there see above ...

<jnlp spec="1.5+" codebase="http://localhost/WebStart" href="jnlp/gapanalysis.jnlp">  


Cheers,
Steve
Try "WebStart" in lower case...
no sorry - no luck
Are you sure your webserver is running and serving from wwwroot?
Also you can try:  <jnlp spec="1.5+" codebase="file:/wwwroot/webstart" href="jnlp/gapanalysis.jnlp">  

Yeah it reaches the page OK so the root is wwwroot.  Also your suggestion to use file:/ createst the same "Unknowwn Source" error.

Cheers,
Steve
Can you try changing:

codebase="http://localhost/WebStart"

to

codebase="http://IP.OF.THE.WEBSERVER/WebStart"

?

Obviously subsitutting the ip address of the webserver in the relevant place ;-)
Sorry same error
What error (if any) do you get by going to

http://localhost/WebStart/jnlp/gapdataclient.jnlp

in your browser?
OK when I type ...

http://localhost/webstart/jnlp/gapdataclient.jnlp

I get a 404 error

When I type the following (I lied to you the root is www not wwwroot, but that is how it is set up in the http.config file so it shouldn't affect anything) ...

file:/c:/www/WebStart/jnlp/gapdataclient.jnlp

WebStart launches and I get the "Unknown Source" error again.

Right...so the problem is that the webserver is not serving that file for some reason...

if you copy a test txt file into

    c:/www/

can you see it via:

   http://localhost/test.txt

?

What about if you then move the file into the WebStart folder?  Can you then see:

http://localhost/WebStart/test.txt 

?

Capitalisation of "WebStart" may be important... I know it is with Tomcat...not sure with the webserver you are running though...it may be a red herring :-/
No in both those cases I get a HTTP 404 error?  I am running Apache HTTP and my directories are all lower case.
Right...that leads me to believe that C:/www is not the document root that apache is running with...

As otherwise it would be able to see the file "test.txt"

Are you sure that's the root?  It is running on your local machine yes?

I'm really sorry, I thought it was, but this line appears in my httpd.conf file ...

DocumentRoot "C:/www/webstart"


steve,

what do you see if you enter just http://localhost  in your browser?
I get an index page due to this line in the httpd.conf file ...

DirectoryIndex index.html index.html.var index.htm

This index page lies in c:\root\webstart\
So make sure your jnlp file is in:

C:\root\webstart\jnlp\gapdataclient.jnlp

and move the jars to the relevant positions in that folder...
OK to summarise; this is the JAR part of my JNLP file ...

<resources>    
 <j2se version="1.4.2+" java-vm-args="-esa -Xnoclassgc" />    
 <jar href="jars/gapdataclient.jar"/>  
</resources>  

The jnlp file is in the following location ...

c:\www\webstart\jnlp\gapdataclient.jnlp

The jar file is in the following location...

c:\www\webstart\jnlp\jars\gapdataclient.jar

Typing ...

http://localhost/jnlp/gapdataclient.jnlp

into my browser launches WebStart, but producess the following error ...

An error occurred while launching/running the application.

Title: Gap Analysis Application
Vendor: Churchill China (UK) Ltd
Category: Download Error

Unable to load resource: http://10.0.1.55/webstart/jnlp/gapdataclient.jnlp


JNLPException[category: Download Error : Exception: java.io.IOException: HTTP response 404 : LaunchDesc: null ]
      at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
      at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
      at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
      at com.sun.javaws.Launcher.downloadResources(Unknown Source)
      at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
      at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
WayHay!!!

Thanks Tim .. I have another error, but if I can't fix it I'll start a new question, so look out for it ;)



Glad I could help!  But I reckon this should probably have been a "split", as dejanpazin spotted the answer to your original question :-/

If you agree, you can post a Q here https://www.experts-exchange.com/Community_Support/ for 0 points, asking for this question to be reopened, then you can make a "split" by clicking the "Split Points" link just above the comment entry box...

Cheers!

Good luck with it!

Tim


>> But I reckon this should probably have been a "split", as dejanpazin spotted the answer to your original question :-/

Thanks Tim!
No worries fella :-)

And thanks to steve_bagnall for sorting this out :-)

I'll sleep better tonight knowing I haven't nicked someone elsesjustly deserved  points ;-)

Good luck Steve!

And thanks again!

Tim
Sorry it seems so long ago, I forgot what my original question was! :)
hee hee, no worries :-)

Glad it's sorted :-)

Tim

Yeah, thx to both!