..
> I'm trying to figure out a problem with deploying my Java Web Start
> application, but the console, that I have set to "Show" in the Java
> Control Panel, ..
(Good move, just as an aside. I have had some
'many response' threads with people recently on
the Sun web start forum, where I cold not even be
sure they understood what a console was, let alone
had it auto-show for any web start app. on their
development machine.)
>..closes during the application start up (along with the
> application).
Yes. I have expereinced web start applications
crashing with no obvious console at all, but that
was a deployment that involved an installer, which
complicated matters.
> There is something happening (I see something get
> printed to the console) but I can't read it.
...hmmm. Try printing something big/distinct, like
*************************************
at the very beginning of the main() of the application,
I suspect this deployment is not even getting that far.
> Any idea why the console would close?
Sh*t happens?
>...Can I force it to stay open or
> log it somehow?
I think you can log it, or it automatically gets
logged, but I have never had much involvement
with logging.
> Further, I have an feeling my application cannot access some data
> files it's trying to read -- I put them in the JAR in the same
> (relative) folder they are in on my machine. The file reference in
> the program is relative... but now I'm thinking that the Web Start
> application is not actually looking in the JAR for the data files, but
> perhaps rather on the user's computer.
As mentioned, I doubt it is even getting that far.
It is rare that faults within the application
will cause web start itself, to fail.
My experience is that 90%+ of web start
problems begin within the JNLP file.
The JNLP for this application is?
(paste content, or preferably URL to live version)
Andrew T.
ChrisC - 02 Feb 2007 07:21 GMT
> As mentioned, I doubt it is even getting that far.
> It is rare that faults within the application
> will cause web start itself, to fail.
I'm definitely seeing some of my debugging output appear and what
looks like a stack trace before it disappears. I had some other
problems before but they didn't cause the console to close so I was
able to fix them.
> The JNLP for this application is?
> (paste content, or preferably URL to live version)
... I'm a bit embarrassed because this is my first Web Start attempt
so it might be all wrong, but here it is:
http://www.cs.utoronto.ca/~ccollins/projects/wne/wne.jnlp
Thanks for looking into it and your comments.
Chris
Andrew Thompson - 02 Feb 2007 08:16 GMT
..
> > The JNLP for this application is?
..
> http://www.cs.utoronto.ca/~ccollins/projects/wne/wne.jnlp
I suggest this, in place of all the
separate 'resources' elements.
<!-- resources elements are commonly split up
to provide specific resources to particular
OS's, or for localisation data. Only one
J2SE element will be parsed. 'onclick' is
not a valid attribute for any JNLP element.
-->
<resources>
<j2se
href="http://java.sun.com/products/autodl/j2se"
version="1.4+"
initial-heap-size="256m"
max-heap-size="1024m" />
<jar href="wordnetexplorer.jar"/>
<jar href="prefuse.jar"/>
<jar href="jwnl.jar"/>
<jar href="uio.jar"/>
<jar href="utilities.jar"/>
<jar href="commons-logging.jar"/>
<jar href="tests.jar"/>
</resources>
Given it is an application that requests extended
privileges, I take it that all your Jar's are signed?
Also noting that no jar element has a
main="true"
attribute defined, the main() is in
the first jar, with a manifest?
(At 13.3 Meg, I am not about to download it!)
Andrew T.
Thomas Fritsch - 02 Feb 2007 10:53 GMT
ChrisC schrieb:
>>As mentioned, I doubt it is even getting that far.
>>It is rare that faults within the application
[quoted text clipped - 14 lines]
>
> Thanks for looking into it and your comments.
When starting your JNLP-link I get the following console-output
(and BTW: my console stays open after that).
Does my stack trace look similar to yours?
I have Java 1.5.0 installed and selected in the JNLP-runtime-settings of
the Java Control Panel.
Requesting URL: http://www.cs.utoronto.ca/~ccollins/projects/wne/wne.gif
Exception in thread "javawsApplicationMain"
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.access$100(Unknown Source)
at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(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)

Signature
Thomas
Andrew Thompson - 02 Feb 2007 12:14 GMT
On Feb 2, 9:53 pm, Thomas Fritsch <i.dont.like.s...@invalid.com>
wrote:
> ChrisC schrieb:
> >http://www.cs.utoronto.ca/~ccollins/projects/wne/wne.jnlp
..
> When starting your JNLP-link I get the following console-output
...
> Requesting URL:http://www.cs.utoronto.ca/~ccollins/projects/wne/wne.gif
> Exception in thread "javawsApplicationMain"
> java.lang.UnsupportedClassVersionError: Bad version number in .class file
Why would web start(/the JVM) be checking
the 'class version number' for a gif? Is that
what is happening? That seems very odd.
Andrew T.
Thomas Fritsch - 02 Feb 2007 12:40 GMT
> On Feb 2, 9:53 pm, Thomas Fritsch <i.dont.like.s...@invalid.com>
> wrote:
[quoted text clipped - 16 lines]
> the 'class version number' for a gif? Is that
> what is happening? That seems very odd.
I don't think these 2 lines (requesting gif, Exception) are related in
any way.
(1) JavaWS just logs the request for the gif (the icon specified in the
JNLP, btw). JavaWS always does so, even when no error occurs.
(2) Later, when loading a .class file, an UnsupportedClassVersionError
happens. Unfortunately the name of the causing .class file is not reported.

Signature
Thomas
Thomas Fritsch - 02 Feb 2007 12:24 GMT
> I'm definitely seeing some of my debugging output appear and what
> looks like a stack trace before it disappears. I had some other
[quoted text clipped - 8 lines]
>
> http://www.cs.utoronto.ca/~ccollins/projects/wne/wne.jnlp
Your "wordnetexplorer.jar" ("RMwordnetexplorer.jar" in my javaws cache)
seems to have a corrupted "manifest.mf". All long lines are wrapped
after ~70 characters, for example:
Name: ca/utoronto/cs/wordnetexplorer/prefuse/layout/WordNetRadialTreeL
ayout.class
SHA1-Digest: YsTJqsboxr7FLlqrxYKtTa7Ep0Q=
I don't know whether this may be the cause of your posted problem or yet
another problem.

Signature
Thomas
Thomas Fritsch - 02 Feb 2007 14:29 GMT
> Your "wordnetexplorer.jar" ("RMwordnetexplorer.jar" in my javaws cache)
> seems to have a corrupted "manifest.mf". All long lines are wrapped
[quoted text clipped - 3 lines]
> ayout.class
> SHA1-Digest: YsTJqsboxr7FLlqrxYKtTa7Ep0Q=
Forget my post! The wrapped lines are OK according to the JAR file spec.
<quote>
No line may be longer than 72 bytes (not characters), in its
UTF8-encoded form. If a value would make the initial line longer than
this, it should be continued on extra lines (each starting with a single
SPACE).
</quote>

Signature
Thomas
ChrisC - 02 Feb 2007 07:53 GMT
Hi Andrew and whoever is reading,
Off topic a bit, but I've seen in your other posts that you suggest
always validating the JNLP against the DTD. I've also seen this
elsewhere. I got the JDK 6 DTD from Sun, but for the next step I'm a
bit lost. I searched "validate jnlp against dtd" and found nothing
useful. I understand the concept of validation but is there some
common tool to do it? Just looking up "validate XML" seems to reveal
a bunch of software of doubtful quality.
Chris
Andrew Thompson - 02 Feb 2007 12:17 GMT
> Hi Andrew and whoever is reading,
>
[quoted text clipped - 5 lines]
> common tool to do it? Just looking up "validate XML" seems to reveal
> a bunch of software of doubtful quality.
I understand your quandry, I usually use an
ant based task to do it, but have been meaning
to look into making a little 'validate this against
that' type application..
Do you run ant?
What IDE are you using (if any)?
Andrew T.
ChrisC - 07 Feb 2007 05:19 GMT
Hello,
sorry for the slow response -- I still didn't figure out my Web Start
woes yet, but regarding validation:
> Do you run ant?
No, not right now I don't.
> What IDE are you using (if any)?
Eclipse 3.2.1.
Chris