This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JNLP and Web Start and the fly likes Periodic errors when launching from Web Start Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Periodic errors when launching from Web Start" Watch "Periodic errors when launching from Web Start" New topic
Author

Periodic errors when launching from Web Start

Ron VanDerMaarel
Greenhorn

Joined: Aug 17, 2012
Posts: 1
Hi All,

We are experiencing an issue that does not happen all the time for all users.
We are using Java Web Start to launch an application from our server.
The first time it is launched, there is no issues, it creates a short cut on the desktop, and everything works great.
After a while, some users will get a failure to launch error when clicking the icon on their desktop.
When we look at the cache, the application is no longer there.
At this point we delete the icon from the desktop, and relaunch the application from the server.
The application then has to be removed from the cache, because the icon does not get reinstalled on the desktop.
Once we launch it again from the server, the icon appears and the user is good for a while again.

We thought it originally had something to do when users logged in through VPN, but now we are finding the issue is with uses who have a machine which is always connected to the network ?

Has anyone come across this, and know of a solution. Some users are getting frustrated, with having to call support to have the application reinstalled periodically.

Thanks
Ron VanDerMaarel
Joe Areeda
Ranch Hand

Joined: Apr 15, 2011
Posts: 316
    
    2

Ron,

I'm not sure what's happening but it seems like you're leaving necessary parts of your application in a temporary directory that periodically is being cleared.

You didn't say which OS the clients are using so I'll make my SWAGs OS independent.

My technique for tracking this down would start with what's going on the desktop is it a shortcut or link or all the jars needed to run? If it's a link where's that pointing to?

Next I'd go to a machine or an account on which I didn't care about browser history, cache, cookies ..., Launch the app, then clear cookies, history, cache and temporary files. Does the program still run?

If my pure speculation and wild guesses just happen to have stumbled onto something, the program won't run. If not the easiest solution is probably to package your app into a single jar and have your "installer" put it someplace permanent. Or you could copy (not link) the jnlp file to the Desktop and have it download everything each time it is run.

Again just a a wild guess on the problem on my part. Let us know more and somebody a lot smarter than me will probably have a real answer for you.

Joe


It's not what your program can do, it's what your users do with the program.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Just last night I installed the latest version of Java on my Windows 7 PC here. And then when I went to run a Web Start application which has been running fine for months, all of a sudden the shortcut was pointing to an application (javaws.exe) which wasn't there any more.

Apparently the installation had removed javaws.exe from a folder named something like C:\Windows\sysWOW64, where I suppose it had been located for quite a while, and decided that the executable should be in C:\Program Files (x86)\Java\jre7\bin with all of the other Java executables. It took me a few minutes to track that down and fix the shortcut, but obviously that isn't something you want happening when your users aren't Java techies.

I don't know if that's what is happening to your users -- it doesn't really sound like it -- but there do seem to be a lot of Web Start snafus which pop up with every new Java release these days.
Joe Areeda
Ranch Hand

Joined: Apr 15, 2011
Posts: 316
    
    2

Paul Clapham wrote:I don't know if that's what is happening to your users -- it doesn't really sound like it -- but there do seem to be a lot of Web Start snafus which pop up with every new Java release these days.


I updated a MacOS Lion machine the other day and installed minor upgrade to Java 6 and javaws just went away. Fortunately they kept the old version and a long silly pathname (I'm not on that system now) let me run the application I needed until I was able to use Time Machine to undo the up(?)grade.

Jacob Anawalt
Ranch Hand

Joined: Oct 27, 2010
Posts: 32

Unfortunately I have also found Web Start shortcuts to be fragile for various reasons. It helps to classify the issues and their likely causes and solutions.

Unable to launch the application

Symptoms:
You attempt to launch a web start application by clicking it's shortcut, Java starts and then you get an error like the following Windows example:

Application Error
Unable to launch the application. [!]

Details / Exception: CouldNotLoadArgumentException
Details / Wrapped Exception: java.io.FileNotFound Exception


You go to the cache location and the file is not there.

Problem:

Someone or something deleted the cached jnlp file that the shortcut was pointing javaws at. "Helpful" cache clean up programs like CCleaner, Java updates that change cache locations, or user modifications to the Java control panel "Temporary Internet Files" will do this.

Fix:

Just re-install by revisiting the JNLP URL. Java 7 created web start shortcuts are more robust due to their -J-Djnlp.application.href option to the shortcut target.

javaws has been changed or moved

Symptoms:

On Windows you would get a message like the following one from Windows 8:

Problem with Shortcut

The item 'javaws.exe' that this shortcut refers to has been
changed or moved, so this shortcut will no longer work properly.

Do you want to delete this shortcut?


Problem:

Something deleted javaws.exe from the previously good location. Most likely a Java update on an x64 version of Windows where they seem to randomly choose between System32, SysWOW64, and Program Files as good locations or on Mac as you transition from Java 6 by Apple to Java 7 by Oracle.

https://forums.oracle.com/forums/thread.jspa?threadID=2526581

Fix:

"Uninstall" and "Reinstall", or (on Windows) delete all shortcuts (including any in your start menu) and then use the Java control panel Java Cache Viewer to re-create the shortcuts. If you don't delete all shorcuts created by JWS, it will not re-create the missing ones on re-install and the "Create Shortcut" button in the Java Cache Viewer will be disabled.

Fails to create shortcuts (Windows)

Symptoms:

Re-installing does not create shortcuts and the Install shortcuts button of the Java Cache Viewer is disabled after the user "deleted the (JWS) program".

Problem:

One of many shortcuts was deleted, one or more remains. Likely the program was "deleted" by simply deleting the desktop shortcut but a start menu one still exists.

Fix:

Delete the other shortcuts your jnlp file creates and then "reinstall" or use the Install shortcuts button of the Java Cache Viewer.

Fails to create shortcuts (Mac)

Symptoms:

Installing does not create shortcuts.

Problem:

Java Web Start launching seems broken during the transition from Apple's Java 1.6 to Oracle's 1.7. The systems that have both 1.6 and 1.7 are especially messy to troubleshoot, but even the pure 1.7 systems don't work.

https://forums.oracle.com/forums/thread.jspa?threadID=2516454

Work-around:

Download the jnlp file. You may need to use curl if you don't have a browser that is willing to save it as a file. Then double-click this file to launch.



There are other edge case errors like the Windows 8 shortcut icons that seems to now be fixed with 1.7.21_0, but those are the main ones that we see as "periodic errors when launching from Web Start" outside of self-inflicted personal firewall software trouble.


Jacob
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Periodic errors when launching from Web Start