This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

missing from the launch file: jnlp

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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:
[......]

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic