Вопрос

I've stumbled on some strange behavior when running my Java app through webstart. I used to have iText jars added to my project in Netbeans 7.3.1. Recently, I removed these jars from my libraries (via project properties) as I did not use it anymore. I've rebuild the project (with code-signing certificate), had no errors whatsoever and put the new update online.

Now, when I open the app for a first time through Java webstart (JNLP), I receive the following error (from Java console):

...
basic: exception: Unable to load resource: http://<my url>/lib/itextpdf-5.3.1-javadoc.jar.
ExitException[ 3]com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://<my url>/lib/itextpdf-5.3.1-javadoc.jar
at sun.plugin2.applet.JNLP2Manager.downloadResources(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ignored exception: ExitException[ 3]com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://<my url>/lib/itextpdf-5.3.1-javadoc.jar
...

Other jars are downloaded without issues. I have searched in my project if I have any false references to this particular jar but I don't find anything. There is no reference in my JNLP file, no reference in my project.properties file, no reference in my private.propterties file, ...

The second time I launch the app, It starts without giving an errormessage...

Any ideas what the issue could be or what else I can check?

Thanks in advance!

EDIT

It looks that the issue disappears when I disable "Keep temporary files on my computer". When I re-enable it, the issue reappears... Running javaws -clearcache does not seem to help..

EDIT2

So, as I'm still trying to pinpoint the exact cause of this problem, I've created a new JavaFX project in Netbeans 7.4. I copied my src folder from the old project folder to the new one, re-opened the new project in Netbeans 7.4 and fixed the missing jars and libraries. I have rebuild the project and put it online and still have the same issue (with caching on), however, now it is not with the iText jar, but with this one:

ExitException[ 3]com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://<my url>/lib/asm-all-repackaged-2.1.88.jar
at sun.plugin2.applet.JNLP2Manager.downloadResources(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

That jar is indeed not in my lib folder, but I have not added it anywhere in my project without me knowing about is. The app itself makes use of Jersey 1.8 (not 2) to handle REST requests. Has this has anything to do with it? Any info would be of great value.

Это было полезно?

Решение

Ok, I have found the solution... it's actually something silly but I'm glad I got it solved:

  • The problem with the iText jar was fixed by creating a new project
  • The issue with the other jars missing (asm-all-repackaged-2.1.88.jar, ...) was due to the fact that the Jersey 2.0 and JAX-RS 2.0 libraries were not added to the newly created project. I do find it pretty strange thou because I did add the jersey-bundle-1.18.jar (so it should use that one no?)

However I still find it strange that the app worked with the java cache disabled (and without the Jersey 2.0 and JAX-RS 2.0 lib), why did it not give an error while launching then and only when cache was enabled?

Anyway, problem is solved but if somebody has the time to clarify this, please go ahead :)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top