wood burning stoves 2.0*
The moose likes JNLP and Web Start and the fly likes missing from the launch file: jnlp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "missing from the launch file: jnlp" Watch "missing from the launch file: jnlp" New topic
Author

missing from the launch file: jnlp

jeffrey.ng boon.hock
Greenhorn

Joined: Feb 10, 2005
Posts: 2
I simply cant find the mistake. Any advise is appreciated. I got this working previously without the security element. Removed the securiy element, restart tomcat remove webstart cache i still get the same exception.

tried changing the codebase but still get the same exception after tomcat restart.
codebase="http://localhost:8080/war/app"
or
codebase="$$codebase"

tried the unofficial guide in JNLP -
http://www.vamphq.com/jwsfaqp.html

but to no avail

=======================================================================
Q: How can I find out why Web Start fails to parse my JNLP startup file?
=======================================================================
If Web Start chokes on your JNLP startup file (e.g. "Launch File Error: The following required field is missing from the launch file: <jnlp>"), and your app won't show, turn on the magic TraceXMLParsing switch, to find out why me. Follow these steps:

go into the Java tab in the app manager's preference panel and change javaw.exe to java.exe (dropping the trailing w tells the Java runtime to pop up a console window that shows every message sent to stdout)
go to the directory where javaws itself hangs out (on Windope usually at C:\Program Files\Java Web Start)

create a file called .javawsrc containing the line: TraceXMLParsing=true
run javaws from the shell and pass in your JNLP file's URL as an argument (e.g. javaws http://www.jenomics.de/vamp/hazel.jnlp)

watch the console window as the story unfolds (scrolls by) and Web Start chokes when swallowing (parsing) your JNLP startup file.
=================================================================

cannot create a file .javawsrc instead i created jnlp-scorpio.javawsrc at web start directory where javaws reside. nothing happens.


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

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.main(Unknown Source)


=====================================================
JNLP
=====================================================
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/war/app">
<information>
<title>XXXX</title>
<vendor>XXXXXX</vendor>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="scorpio-gui.jar" />
</resources>
<application-desc main-class="kbots.scorpio.perso.PersonalizationApp"/>
</jnlp>
Cristian Negresco
Ranch Hand

Joined: Sep 15, 2001
Posts: 182
Hi,

I could launch the jnlp file with jws 1.4.2_04 running with jre 1.4.2.04.
Try to deleting the jws cache and the browser cache - if you launch it using the browser.
Try playing with the headers in the beginning of the file. I have:

<?xml version='1.0' encoding='UTF-8'?>

for the jnlp file I make. I remember receiving this error a while ago.

BR,
Cristian
jeffrey.ng boon.hock
Greenhorn

Joined: Feb 10, 2005
Posts: 2
I found the issue.

Test Case 1:
1.Took webpad.jnlp and place under the my webapp.
2.Double-click on webpad.jnlp.
3.Exception but it is ok because it is looking for $$codebase. That shows that the parsing is successful.

Test Case 2:
1.Took webpad.jnlp and place under the my webapp.
2.Remove an undercarriage using utraedit (text editor)
3.Double-click on webpad.jnlp.
4.Exception with parser error.

Test Case 3:
1.Took webpad.jnlp and place under the my webapp.
2.Remove an undercarriage using notepad/wordpad.
3.Double-click on webpad.jnlp.
4.Exception but it is ok because it is looking for $$codebase. That shows that the parsing is successful.

Therefore i conclude that the coding of jnlp file matters. Not sure what is the coding type as i tried to convert from unicode to utf8 in utraedit but no use.

Now my jnlp is working.

Cheers.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
To work around the issue of Windows Explorer not allowing the creation of a file without a name before the dot, rename the file from a command prompt with the "ren" command.

ren foo.javawsrc .javawsrc

That worked for me.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
preeti patnaik
Greenhorn

Joined: Sep 24, 2009
Posts: 1
hi,

i have some doubt, can you please help me out:
a)go into the Java tab in the app manager's preference panel
(what and where is the app manager's preference panel?)
b)go to the directory where javaws itself hangs out (on Windope (what is windope? is is a typo for Windows?) usually at C:\Program Files\Java Web Start) (but in our case Java Web Start is installed in C:\Program Files\Java\jre folder. so what is the directory in our context?)

Thanks and Regards,
Preeti
luis garciaa
Greenhorn

Joined: Aug 25, 2010
Posts: 1

Had the same problem.

If using Ultraedit, the best thing is to save the file as ASCII. This will show up any hidden character that is blowing up the xml load. Even XMLSpy didn't pick up on the problem.

If using Notepad, maybe saving as ANSI will do the same.


jeffrey.ng boon.hock wrote:I found the issue.

Test Case 1:
[......]
tanker danker
Greenhorn

Joined: Feb 19, 2011
Posts: 1
hi guys,

in my case, i placed jnlp in my web app. when i call jnlp from browser ,

some application wide used code like some js scripts and import links etc. are returning so jnlp can not be parsed.

your request to jnlp location must only return jnlp xml itself.

my simple solution is this
 
Consider Paul's rocket mass heater.
 
subject: missing from the launch file: jnlp
 
Similar Threads
Starting Suns Sample App webpad
javax.jnlp
Is It bug in web start?
Launch Exception encountered in Java Web Start
Unable to launch the application