![]() |
Java Web Start Console closes unexpectedly / Reading in data
Hello,
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, closes during the application start up (along with the application). There is something happening (I see something get printed to the console) but I can't read it. Any idea why the console would close? Can I force it to stay open or log it somehow? 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. How should I supply and read in a data file using Web Start? Thanks for any advice! Christopher |
Re: Java Web Start Console closes unexpectedly / Reading in data
On Feb 2, 4:35 pm, "ChrisC" <christopher.m.coll...@gmail.com> wrote:
... > 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. |
Re: Java Web Start Console closes unexpectedly / Reading in data
> 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/...s/wne/wne.jnlp Thanks for looking into it and your comments. Chris |
Re: Java Web Start Console closes unexpectedly / Reading in data
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 |
Re: Java Web Start Console closes unexpectedly / Reading in data
On Feb 2, 6:21 pm, "ChrisC" <christopher.m.coll...@gmail.com> wrote:
... > > The JNLP for this application is? ... > http://www.cs.utoronto.ca/~ccollins/...s/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. |
Re: Java Web Start Console closes unexpectedly / Reading in data
ChrisC schrieb:
>>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/...s/wne/wne.jnlp > > 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/...ts/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(Unknow n 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(Unkn own Source) at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) -- Thomas |
Re: Java Web Start Console closes unexpectedly / Reading in data
On Feb 2, 9:53 pm, Thomas Fritsch <i.dont.like.s...@invalid.com>
wrote: > ChrisC schrieb: > >http://www.cs.utoronto.ca/~ccollins/...s/wne/wne.jnlp ... > When starting your JNLP-link I get the following console-output .... > Requesting URL:http://www.cs.utoronto.ca/~ccollins/...ts/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. |
Re: Java Web Start Console closes unexpectedly / Reading in data
On Feb 2, 6:53 pm, "ChrisC" <christopher.m.coll...@gmail.com> wrote:
> 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. 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. |
Re: Java Web Start Console closes unexpectedly / Reading in data
ChrisC wrote:
> 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/...s/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. -- Thomas |
Re: Java Web Start Console closes unexpectedly / Reading in data
Andrew Thompson wrote:
> On Feb 2, 9:53 pm, Thomas Fritsch <i.dont.like.s...@invalid.com> > wrote: > >>ChrisC schrieb: > > >>>http://www.cs.utoronto.ca/~ccollins/...s/wne/wne.jnlp > > .. > >>When starting your JNLP-link I get the following console-output > > ... > >>Requesting URL:http://www.cs.utoronto.ca/~ccollins/...ts/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. 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. -- Thomas |
| All times are GMT. The time now is 05:18 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.