Building an jnlp file for websphinx.jar

Chaps,

I am trying very badly to create a jnlp file for websphinx.jar which is a free web bot.

The error i am getting is :-

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

at com.sun.javaws.Main$1.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

So far my attempt looks like this

<?xml version="1.0" encoding="utf-8"?>

<!-- JNLP File for My Program v1.0 -->

<jnlp

spec="1.0+"

codebase="http://192.168.116.128/admin/bot"

href="webbot2.jnlp">

<information>

<title>Web Bot v1.0</title>

<vendor>websphinx.</vendor>

<homepage href="default.html"/>

<description>Web Bot Crawler</description>

<icon href="myicon.jpg">

<offline-allowed/>

</information>

<security>

<all-permissions/>

</security>

<resources>

<j2se version="1.2+"/>

<jar href="websphinx.jar">

</resources>

<application-desc main-class="Crawler">

</application-desc>

</jnlp>

What i am unsure of is what the correct class is and what i have missed!

Any assistance would be greatly apprieciated!

Thanks

javaless

[1822 byte] By [javalessa] at [2007-11-27 10:44:37]
# 1

That JNLP file has some unclosed elements.

The web start parser works very poorly with

malformed XML, and often reports errors in

much later sections of the file.

Here is a corrected version of the file, with

the closed elements highlit in the lines that

contain ('quoted') blue text.

<?xml version="1.0" encoding="utf-8"?>

<!-- JNLP File for My Program v1.0 -->

<jnlp

spec="1.0+"

codebase="http://192.168.116.128/admin/bot"

href="webbot2.jnlp">

<information>

<title>Web Bot v1.0</title>

<vendor>websphinx.</vendor>

<homepage href="default.html"/>

<description>Web Bot Crawler</description>

<icon href='myicon.jpg' />

<offline-allowed/>

</information>

<security>

<all-permissions/>

</security>

<resources>

<j2se version="1.2+"/>

<jar href='websphinx.jar' />

</resources>

<application-desc main-class="Crawler">

</application-desc>

</jnlp>

HTH

Message was edited by:

AndrewThompson64

AndrewThompson64a at 2007-7-28 20:07:57 > top of Java-index,Desktop,Deploying...
# 2

Thanks Andrew,

That definately got me further.

As this is my first ever attempt at creating a jnlp file is a difficult to read what the problem is.

The next confusion is the error i am receiving. Not to you i'm sure :)

Essentially i am getting in exeption -

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://192.168.116.128/admin/bot/webbot2.jnlp

And in Wrapped exeption -

java.io.FileNotFoundException: http://192.168.116.128/admin/bot/webbot2.jnlp

The file location of webbot2.jnlp is a stated as above.

How ever when i simply paste the URL in explorer i get the standard " The page can not be displayed".

I am unsure if this could be a permissions issue or not! How ever i have played with IIS and nothing i do seems to help.

If you have any thoughts that would be superb.

Thanks again

javaless

javalessa at 2007-7-28 20:07:57 > top of Java-index,Desktop,Deploying...
# 3

> Thanks Andrew,

You're welcome.

> That definately got me further.

So I get the dukes for that question? ;-)

> As this is my first ever attempt at creating a jnlp

> file is a difficult to read what the problem is.

We were all starters once. I still feel like

a newb when it comes to parts of the web

start API!

> The next confusion is the error i am receiving. Not

> to you i'm sure :)

This is really a different question to the first

one. Perhaps a more specific title of ..

"FailedDownloadException: Unable to load resource- IIS"

..would be good.

(In fact - I just changed it to that - hope nobody minds)

> Essentially i am getting in exeption -

>

> com.sun.deploy.net.FailedDownloadException: Unable to

> load resource:

> http://192.168.116.128/admin/bot/webbot2.jnlp

Interesting you should mention that.

I tried fetching both the root directory, then the

jar file as a direct URL in the browser, and got

the same/similar result - 404.

I guessed at the time that this was an

internal server, not publicly accessible,

and did not think more on it.

OTOH - if it is supposed to be publicly

accessible, the JNLP file, as well as all

resources need to be 'fetchable' in an

average old browser, each by the URL

made up of the codebase and href.

The jar, for example, should be fetchable

by clicking 'here'..

http://192.168.116.128/admin/bot/websphinx.jar

(or it would, if this forum reformats that as a link)

> How ever when i simply paste the URL in explorer i

> get the standard " The page can not be displayed".

Exactly like that. It does sound like an ...

> I am unsure if this could be a permissions issue or

> not! How ever i have played with IIS ..

IIS problem (shrugs) I don't have much

experience with IIS.

> If you have any thoughts that would be superb.

Use apache/tomcat? It might not be an option

for you, but note that it is stable, fast, free, ..and a

lot more people around 'these parts'* know how

it works. * Though there are Sun forums far better

suited to questions about servers.

BTW - if you want to go on testing the JNLP

application, separate to the server, look into

the javaws command line tool option for

setting the codebase to a local directory.

For example, the application can be run

locally, if you can navigate to the directory

containing the JNLP file and jar, and use

the command..

javaws -codebase file:. file:./webbot2.jnlp

Give that a try - see how you go.

I note your application needs full privileges.

Is it digitally signed?

Message was edited by:

AndrewThompson64

AndrewThompson64a at 2007-7-28 20:07:57 > top of Java-index,Desktop,Deploying...
# 4

Thanks for the reply.

Did make me smile..

Thanks for the advice re platforms but i am primarly an asp/windows developer-ish person "hiss boo" i hear you say!

I'm afraid all this clever "real" programming code is far above me so working with VB at pres which makes more sense for a worker ant like myself!

Looking at IIS .. "again hiss boo" i am sure it is the application settings that are probably wrong and as i have not published a full app before now ... (off going investigating on IIS app settings).

Most of my code up to now has been "written by a ten year old - google searched" asp based so no application stuff as yet!

Hopefully in the future i will post something more app based but long way off yet plus no post grad computer science knowledge slows us down.

Cheers

javaless

javalessa at 2007-7-28 20:07:57 > top of Java-index,Desktop,Deploying...