JDK-8027809 : ClassNotFound exception when loading jnlp applet in nested resource tag
  • Type: Bug
  • Component: deploy
  • Affected Version: 7u45,7u51,8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-11-05
  • Updated: 2015-06-03
  • Resolved: 2014-10-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u40 b12Fixed 9Fixed
This is a follow up issue for fix of JDK-8026002. To reproduce install 7u51 nightly from http://rehudson.us.oracle.com/hudsonws/7u_cpu_deploy/bundles/windows-i586/b255-2013-11-04_313/jre-7u51-ea-bin-b255-windows-i586-04_nov_2013.exe
open http://oklahoma.us.oracle.com/www/tests/1.7.0_51/8026002/applet67.html from JDK-8026002 manual test page. To pass stricter restriction introduced in 7u51 slider setting needs to be Medium.
If you can see ClassNotFound excetpion(as shown in attachment 7u51.png) get thrown the issue is reproduced.
Although the ExitExcetion found in 7u45(as in attachment 7u45.jpg) is gone. The applet still can not load.
to reproduce, add http://oklahoma.us.oracle.com to ESL and run: http://oklahoma.us.oracle.com/www/tests/1.7.0_51/8026002/applet67.html (jnlp file has all the jars nested in <java> elements) before fix, no jars were loaded, and exception error is shown. after fix it runs fine. crucible review: https://java.se.oracle.com/code/cru/CR-JDK9CLIENT-550

1.) The basic fix is to AddJarsToList - when visiting a jre desc, it is not if it is selected that counts, but if it is running (you may or may not relaunch into selected jre, depending on user input, and /or if it is secure.) this fixes #1 above. 2.) although skipExtensions variable unconditionally set to true in plugin (where it is result of prepareLaunchFile in javaws.Launcher) seems wrong, I cannot see any ill effect it is causing. fix to #1 above is enough to fix the given example. 3.) This should also not be a problem once #1 is fixed. (at least the not in cache case). Will test with caching off, and file separate bugs if needed.

This generic problem also affects earlier versions.

having only nested resources in jnlp plugin applet does not work for several reasons: 1.) ResourcesDesc.getEagerorAllJars() does not work properly in plugin. The javaws original implementation is based on the jre Selected to be used in the launch descriptor, but plugin hasn't selected it yet, at the time this is called. Based on security changes over the last year, we modified ResourcesDesc.getMainJar() so that it uses the current jre, instead of the selected jre, since the selected jre may or may not be used, and if the current jre is not used, the code will be run again with the correct jre. All other code in ResourcesDescriptor is still based on the SelectedJRE - and so is now wrong. 2.) JNLP2Manager.prepareLaunchFile() unconditionally sets skipExtensions to true. This results in calls to downloadResources that will never download any eager jars in component extensions. This could be a problem if the main jar is in an extension. 3.) The code in JNLPSignedResourceHelper in checkSignedLaunchDesc() and checkSignedResources() calls into ResourceProvider.get().getCachedResource(), and ResourceProvider.get().getCachedResourceFilePath() which can throw exception if either file is not in cache (caused for example by problem above) or cache is just turned off.

Affected tests: LSPActionRunTest::testLSPCertResNest_High