Java Web Start problem

T

tobleron

Hi,

I tried to make a link in my web page to run ECG Viewer from PixelMed.
I run them in my local PC with IP of 140.135.100.179. Here is the jnlp
file :

<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for ECGViewer -->
<jnlp
spec="1.5+"
codebase="http://140.135.100.179/dicom"
href="ECGViewer.jnlp">
<information>
<title>ECGViewer</title>
<vendor>PixelMed Publishing</vendor>
<homepage href="javadoc/index.html"/>
<description>ECGViewer Application</description>
<description kind="short">A simple DICOM and SCP ECG viewer.</
description>
//<icon href="icons/ECGViewer.png"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+"/>
//<jar href="pixelmed.jar"/>
<jar href="ecgviewer.exe"/>
</resources>
<application-desc main-class="com.pixelmed.displaywave.ECGViewer"/>
//<application-desc main-class="displaywave.ECGViewer"/>
</jnlp>

The .exe file, the .jnlp file, also files and directory of
com.pixelmed.display.ECGViewer are on their place. But when the link
has been clicked, there is an error occurs :

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)

What should I do to solve this problem ? Thank you for your comments
and helps.
 
S

steen

  <application-desc main-class="com.pixelmed.displaywave.ECGViewer"/>
  //<application-desc main-class="displaywave.ECGViewer"/>
</jnlp>

If I were to venture a guess, it would be the "commenting" you're
using. In an XML file you would use <!-- -->, not //

/Steen
 
T

tobleron

I already fixed my comment tag as suggested.

When I click the link from the browser, there is an error meesage
occurs :

Unsigned application requesting unrestricted access to system.
Unsigned resource: http://140.135.100.179/dicom/viewer/pixelmed.jar.

Here is the complete error message:

JNLPException[category: Security Error : Exception: null :
LaunchDesc:
<jnlp spec="1.5+" codebase="http://140.135.100.179/dicom/viewer/"
href="http://140.135.100.179/dicom/viewer/ECGViewer.jnlp">
<information>
<title>Open source ECGViewer</title>
<vendor>PixelMed Publishing (modified by Budhi Kristianto)</
vendor>
<homepage href="http://140.135.100.179/dicom/viewer/javadoc/
index.html"/>
<description>Open source ECGViewer Application</description>
<description kind="short">An open source ECG viewer.</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<resources>
<java version="1.5+"/>
<jar href="http://140.135.100.179/dicom/viewer/pixelmed.jar"
download="eager" main="false"/>
</resources>
<application-desc main-class="com.pixelmed.displaywave.ECGViewer"/>
</jnlp> ]
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown
Source)
at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(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)

What should I do ?
 
J

John B. Matthews

[...]
When I click the link from the browser, there is an error meesage
occurs :

Unsigned application requesting unrestricted access to system.
Unsigned resource: http://140.135.100.179/dicom/viewer/pixelmed.jar.

Here is the complete error message: [...]
What should I do ?

Sign the resource using a suitable key:

<http://java.sun.com/javase/6/docs/technotes/tools/windows/jarsigner.html>
<http://java.sun.com/javase/6/docs/technotes/tools/windows/keytool.html>

This allows your users to verify that they are using your version and not
some maliciously altered variant.
 
R

Roedy Green

I tried to make a link in my web page to run ECG Viewer from PixelMed.
I run them in my local PC with IP of 140.135.100.179. Here is the jnlp
file :

see http://mindprod.com/jgloss/jnlp.html for some schemas to validate
JNLP.

I found it helps to do an eyeball line by line compare with the sample
JNLP file shown there and checking out any differences from what you
wrote.
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
R

Roedy Green

Unsigned application requesting unrestricted access to system.

you must sign your jars.

See http://mindprod.com/jgloss/jarsignerexe.html
http://mindprod.com/jgloss/digitalsignatures.html
http://mindprod.com/jgloss/certificate.html
http://mindprod.com/jgloss/ant.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
T

tobleron

Can I by-pass the sign process ? The signing process of the jar file
gave me headaches.
Can I set the application to allow execution of unsigned jar file ?
How ?
 
T

tobleron

Can I by-pass the sign process ? The signing process of the jar file
gave me headaches.
Can I set the application to allow execution of unsigned jar file ?
How ?

I just want my jnlp file download and run the jar file. I don't need
such complicated way.
 
A

Andrew Thompson

Can I by-pass the sign process ?

If you can, let us know how. We will
raise a security bug with Sun.

Do you run Ant? I have example build
files that sign code, try this one..
<http://pscode.org/jws/api.html#fs>

BTW - I just noticed another thing in the
JNLP that validation would not pick up

<jar href="ecgviewer.exe"/>

Do you really have a raw Windows 'exe'
file as part of the resources for this
app.?

a) That will not work on Linux or Mac.
and should be put in a Win specific
resource section, and..
b) That will not even work on Windows.
You would need to use an installer element /
extension to download the exe and store
it in a known location for future use.

Is that what you are having trouble
signing? (No, it would never work..)
 
T

tobleron

Hi, finally I can sign the jar file using KeyToll UIU. And the jnlp
file works well. Thank you for your suggestions and comments.

Thread closed.
 
R

Roedy Green

Can I by-pass the sign process ? The signing process of the jar file
gave me headaches.
Can I set the application to allow execution of unsigned jar file ?
How ?

It requires zero labour if you do it the way I do. I wrote a stomp
program that generates my ant scripts.

You can use phony certificates to save money. However then Sun alarms
the user and suggests NOT accepting them.

Signing looks like this in ANT

<!-- S I G N -->
<!-- get _your_ password from set jarsignerpassword=sesame -->
<!-- get _your_ code-signing certificate from set
cert=mindprodcert2008dsa -->
<property environment="env" />
<signjar jar="${jar.file}"
alias="${env.cert}" storepass="${env.jarsignerpassword}" />
</target>

--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
R

Roedy Green

I just want my jnlp file download and run the jar file. I don't need
such complicated way.

It is much less complicated than you think. It takes a lot of reading
to get your head around what is happening, but in the end it is just
an extra line in your ANT script.
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
R

Roedy Green

Thread closed.

That indicates you may be under a delusion that the newsgroups are a
sort of free help desk. It is better to think of them as a place where
people discuss issues tossed into the ring. The purpose is for mutual
education, one upmanship, showing off, entertainment... not just to
rescue the original questioner.

The thread is thus not closed until EVERYONE is finished discussing
the matter.

A better way to say the same thing would be "Thanks for all your
ideas. I have learned enough to solve my immediate problem."
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
T

tobleron

@All

I'm so sorry for the misunderstanding.

In my language, thread closed means "Thanks for all your ideas. I
have learned enough to solve my immediate problem. And the problem has
been solved based on your suggestions. I'm very appreciate. Thank you
very much."
 
J

John B. Matthews

Arne Vajhøj said:
I think he just meant that his problem was solved - not
trying to command anyone.

You are surely correct. I know I should should resist such drollery.
Roedy explained it, and Budhi got it.
 
A

Andrew Thompson

... Roedy explained it, and Budhi got it.

Budhi is most wise and benificent.

For the benefit of the rest of us..

"Hey, tobleron, you may have 'solved it',
but the rest of us are curious about what
the exact solution was, ..this being a
discussion forum, as opposed to a help desk.

So 'thanks - problem solved' is hardly enough
to satisfy our interest and curiosity. You 'owe'*
us that much"

* No, you don't actually owe anybody anything,
but it will sure help when you ask more
questions..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top