|
Description
|
The NASA World Wind Java development team reported a failure to launch their Java Web Start demo. The symptom is that one of the JOGL native libraries, which is deployed as a JNLP extension, fails to be found during launch, causing an UnsatisfiedLinkError. The failure is somehow due to corruption of the deployment cache. Clearing the cache allows the application to launch.
This is not an isolated incident; it was reproduced independently on more than one machine owned by NASA. Therefore the severity of the problem is high.
To reproduce the bug, unzip the attached cache_old.zip (from a 32-bit Windows machine) and replace C:/Documents and Settings/[username]/Application Data/Sun/Java/Deployment/cache with it. Browse to http://worldwind.arc.nasa.gov/java/ and launch their Java Web Start demo: http://worldwind.arc.nasa.gov/java/0.2.0/webstart/BasicDemo.jnlp . The UnsatisfiedLinkError reported in the attached console.txt will be displayed. Clearing the deployment cache allows successful loading of the demo. The root cause is obviously corruption of the deployment cache.
This needs to be fixed both in 7 and the next available 6 update. Filing a SubCR against 6u5, but if it can be fixed earlier then it should be.
Posted Date : 2007-09-22 02:11:29.0
|
|
Comments
|
Submitted On 23-SEP-2008
Tracked down the problem with this bug.
Explanation:
Before loading a library, the LaunchDownload checks to see if any of the native lib jars should be updated. If they are to be updated, the DownloadEngine downloads the new version, but treats it improperly as a NORMAL_CONTENT jar rather than a NATIVE_CONTENT jar. The new cache entry replaces the entry that was downloaded when the application starts.
Active call stack for the bug to occur
LaunchDownload.getNativeDirectories()
DownloadEngine.getUpdatedJarFile(String location, String version)
DownloadEngine.getCachedJarFile(URL resourceURL, String versionString, boolean doDownload)
DownloadEngine.CacheEntry getResourceCacheEntry(URL resourceURL, String resourceID, String versionString, DownloadDelegate dd, boolean doDownload);
In this function, the call forwarded to
DownloadEngine.getResourceCacheEntry(resourceURL, resourceID, versionString, dd, doDownload, false, null, DownloadEngine.NORMAL_CONTENT);
The contentType should be DownloadEngine.NATIVE_CONTENT rather than DownloadEngine.NORMAL_CONTENT
This causes the newly created cache entry to not extract the native jar contents to the proper cache directory.
Workaround:
Use the JNLPDownloadServlet on your application server and ensure that you use versioning on any native libraries that your application uses. This way when the DownloadEngine checks to see if your native libs are up to date, it will use the version number rather than the last modified time reported by the server in the http response.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|