JDK-8213011 : Running application under 1.8u172 via a DRS rules with the 1.8u192 plugin fail with java.lang.NoSuchMethodError
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 8u192
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-10-26
  • Updated: 2019-03-19
  • Resolved: 2018-11-13
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.
JDK 8
8u192Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Running application under 1.8u172 via a DRS rules with the 1.8u192 plugin fail with java.lang.NoSuchMethodError
            sun.misc.JavaUtilJarAccess.ensureInitialization(Ljava/util/jar/JarFile;)V. 
                 java.lang.NoSuchMethodError: 
             sun.misc.JavaUtilJarAccess.ensureInitialization(Ljava/util/jar/JarFile;)V 


Uninstalling update 192 restores function.
Comments
Verified with jre8u201 b04 on win10/x64/IE11. Test app: https://docs.oracle.com/javase/tutorialJWS/samples/uiswing/AccessibleScrollDemoProject/AccessibleScrollDemo.jnlp
22-11-2018

Problem description: The problem is triggered by back-port of JDK-8208754 to JDK 8. It introduced the new method ensureInitialization() and added its invocation to the deploy code. The deploy jars may be executed with different versions of rt.jar. So when relaunch takes place, (i.e. recent versions of deploy jars run with older rt.jar) the call of ensureInitialization() throws NoSuchMethodError. Fix: The invocation of ensureInitialization() should be placed into try-catch block.
02-11-2018

Similar issues: https://bugs.openjdk.java.net/browse/JDK-8213097 https://bugs.openjdk.java.net/browse/JDK-8213096
31-10-2018

The problem is triggered by back-port of JDK-8208754 to JDK 8. It introduced the new method ensureInitialization() to JavaUtilJarAccess. Currently the new method gets called inside DeployURLClassPath and that invocation does not take into account the 'relaunch case', (i.e. when deploy jars from one JRE, (e.g. 8u192) are executed using another JRE, (e.g. 8u172)). In other words if the deploy jars contained ensureInitialization() invocation run using rt.jar which does not have this method, the NoSuchMethodError occurs.
30-10-2018