This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JNLP and Web Start and the fly likes jnlp launch file error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "jnlp launch file error" Watch "jnlp launch file error" New topic
Author

jnlp launch file error

Ravikanth kolli
Ranch Hand

Joined: Feb 10, 2008
Posts: 179

hi i am trying to add an application to my web page and was using jnlp. I am getting the following error

An error occurred while launching/running the application.

Category: Launch File Error

The following required field is missing from the launch file: <jnlp>


the exception that i am get

MissingFieldException[ The following required field is missing from the launch file: <jnlp>]
at com.sun.javaws.jnl.xml.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.main(Unknown Source)

And my jnlp file is



I searched a lot for it but couldnot find a solution to this error.

thanks ranchers for your help..

[ March 26, 2008: Message edited by: Ravikanth kolli ]
[ March 26, 2008: Message edited by: Ravikanth kolli ]

-kolli
Daniel Chemko
Ranch Hand

Joined: Feb 27, 2008
Posts: 32
1. If you must use a local file system as the JNLP host, use the file:// prefix so that the file URL can properly be decoded.

2. When I correct #1, I run into this issue:

MissingFieldException[ The following required field is missing from the launch file: <jnlp><information><vendor>]


So you must specify a vendor code.
Ravikanth kolli
Ranch Hand

Joined: Feb 10, 2008
Posts: 179

hi daniel,

I added the file:// tag in the codebase and also added the vendor information. It gave me the following error

An error occurred while launching/running the application.

Title: Opt
Vendor: Ravikanth
Category: Download Error

Unable to load resource: file://C:/codebase/opt.jnlp


Exception


JNLPException[category: Download Error : Exception: java.net.UnknownHostException: C : LaunchDesc: null ]
at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(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)



i am getting the previous error when i try to run it through the web. Can you tell me what changes should i be doing for it to work?

Thanks a lot..
Satish Atyam
Greenhorn

Joined: Mar 13, 2008
Posts: 3
Hi Ravikanth kolli,
As per my knowledge everything is ok in your jnlp file except codebase,it is the most important tag in the jnlp file,when you depoly your jnlp application on the server you have to change your codebase tag like this

<jnlp spec="1.0+" codebase="http://Ipaddress ortno on which server running/Root folder name" href="launch.jnlp">

For ex:

<jnlp spec="1.0+" codebase="http://192.168.1.125:8080/EventProj"
href="launch.jnlp">


Just try like this.

I hope you will get now.
[ March 27, 2008: Message edited by: Satish Atyam ]
Ravikanth kolli
Ranch Hand

Joined: Feb 10, 2008
Posts: 179

I got it guys thanks a lot..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jnlp launch file error