?
Solved

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

Posted on 2005-04-22
34
Medium Priority
?
667 Views
Last Modified: 2010-08-05
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>


0
Comment
Question by:steve_bagnall
  • 14
  • 12
  • 6
  • +1
33 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 13843084
It thinks the <application-desc> tag is missing...

Try removing the

   <information os="linux">      

block...I've never seen one of those :-/
0
 
LVL 17

Assisted Solution

by:Dejan Pažin
Dejan Pažin earned 1000 total points
ID: 13843220

<homepage href="docs/linuxhelp.html">  does not have a closing tag
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13843271
>> <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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 13843294

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" />
0
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 13843307

>> WELL SPOTTED :-)

thx!
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13843626
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)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13843739
http://localhost/WebStart/jnlp/gapdataclient.jnlp

doesn't exist on your machine...
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13843744
http://localhost/WebStart in the jnlp tag should be the location the app is downloaded from...
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13843848
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
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13843899
Try "WebStart" in lower case...
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13844067
no sorry - no luck
0
 
LVL 15

Expert Comment

by:aozarov
ID: 13847325
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">  

0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13856862
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
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13856877
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 ;-)
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13856912
Sorry same error
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13856926
What error (if any) do you get by going to

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

in your browser?
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13856969
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.

0
 
LVL 35

Expert Comment

by:TimYates
ID: 13856982
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 :-/
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13857026
No in both those cases I get a HTTP 404 error?  I am running Apache HTTP and my directories are all lower case.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13857035
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?

0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13857068
I'm really sorry, I thought it was, but this line appears in my httpd.conf file ...

DocumentRoot "C:/www/webstart"

0
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 13857071

steve,

what do you see if you enter just http://localhost  in your browser?
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13857091
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\
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13857114
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...
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13857162
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)

0
 
LVL 35

Accepted Solution

by:
TimYates earned 1000 total points
ID: 13857175
Ahhhhh!  I see now...

It's looking in:

http://10.0.1.55/webstart/jnlp/gapdataclient.jnlp

wheras it should be looking in:

http://10.0.1.55/jnlp/gapdataclient.jnlp

so change the JNLP file to:

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

And to make it work externally, you will need to replace "localhost" with your proper external IP address...

Tim
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13857200
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 ;)



0
 
LVL 35

Expert Comment

by:TimYates
ID: 13857215
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 http://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
0
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 13857656


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

Thanks Tim!
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13857660
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
0
 
LVL 5

Author Comment

by:steve_bagnall
ID: 13857749
Sorry it seems so long ago, I forgot what my original question was! :)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13857753
hee hee, no worries :-)

Glad it's sorted :-)

Tim
0
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 13857934

Yeah, thx to both!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month16 days, 19 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question