JDK-8026394 : Eclipse fails with JDK8 build 111
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25,8
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-10-14
  • Updated: 2017-12-04
  • Resolved: 2013-10-22
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 Other
8Fixed hs25Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Eclipse Version: Kepler Service Release 1
Build id: 20130919-0819

Can not execute the indexer with JDK8 build 111 due to a change in how java.lang.Object.clone() is treated.

The Eclipse CDT framework has a structure that uses a two level interface structure to create a clone() method that does not throw CloneNotSupportedException. This approach seems to work in b110 but stops working in b111.

I can reproduce the issue with this examle:

public interface IClone extends Cloneable {
	Object clone();
}

public interface ICloneExtend extends IClone { }

public class CloneTest implements  ICloneExtend {
	
	public Object clone() {
		return null;
	}

	public static void tryIt(ICloneExtend o1) {
		Object o2 = o1.clone();
		System.out.println(o1 + " was cloned to " + o2);
	}

	public static void main(String[] args) {
		CloneTest o1 = new CloneTest();
		tryIt(o1);
	}

}


Here is the output:

$ ~/java/jdk1.8.0_b110/bin/java -showversion CloneTest
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b110)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b52, mixed mode)

CloneTest@135fbaa4 was cloned to null



$ ~/java/jdk1.8.0_b111/bin/java -showversion CloneTest
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b111)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b53, mixed mode)

Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class CloneTest
	at CloneTest.tryIt(CloneTest.java:8)
	at CloneTest.main(CloneTest.java:14)


Comments
Verified with jdk8-b123 on Windows 8.1 x64 using regression test (test\runtime\8026394\InterfaceObjectTest.java)
16-01-2014

RULE NSASuiteB/DSAGenParSpec_SUN_JsafeJCE_1024_160 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/DSAGenParSpec_SUN_JsafeJCE_2048_224 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/DSAGenParSpec_SUN_JsafeJCE_2048_256 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/DSAGenParSpec_SUN_SUN_1024_160 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/DSAGenParSpec_SUN_SUN_2048_224 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/DSAGenParSpec_SUN_SUN_2048_256 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA1withDSA1024_160 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA1withDSA2048_224 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA1withDSA2048_256 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA224withDSA1024_160 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA224withDSA2048_224 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA224withDSA2048_256 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA256withDSA1024_160 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA256withDSA2048_224 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/SHA256withDSA2048_256 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDHInteropSunVsCryptoJ Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDHKeyTranslateSunVsCryptoJ Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDSAKeyTranslateSunVsCryptoJ_JsafeJCE_SUN_1024 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDSAKeyTranslateSunVsCryptoJ_JsafeJCE_SUN_2048 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDSAKeyTranslateSunVsCryptoJ_SUN_JsafeJCE_1024 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDSAKeyTranslateSunVsCryptoJ_SUN_JsafeJCE_2048 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDSAKeyTranslateSunVsCryptoJ_SUN_SUN_1024 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V RULE NSASuiteB/TestDSAKeyTranslateSunVsCryptoJ_SUN_SUN_2048 Exception java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V
21-10-2013

Security SQE tests are also failing because of this. Here is the exception trace - Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class com.rsa.cryptoj.c.V at com.rsa.cryptoj.c.V.<init>(Unknown Source) at com.rsa.cryptoj.c.V.<init>(Unknown Source) at com.rsa.cryptoj.c.dD.a(Unknown Source) at com.rsa.cryptoj.c.xc.a(Unknown Source) at com.rsa.cryptoj.c.fl.<init>(Unknown Source) at com.rsa.cryptoj.c.ft.a(Unknown Source) at com.rsa.cryptoj.c.sz$a.<init>(Unknown Source) at com.rsa.cryptoj.c.sz$a.<init>(Unknown Source) at com.rsa.cryptoj.c.sz$a.<clinit>(Unknown Source) at com.rsa.cryptoj.c.nB.a(Unknown Source) at com.rsa.cryptoj.c.nB.<clinit>(Unknown Source) at com.rsa.cryptoj.c.qs.c(Unknown Source) at com.rsa.cryptoj.c.qs.a(Unknown Source) at com.rsa.cryptoj.c.d$j.a(Unknown Source) at com.rsa.cryptoj.c.d$l.a(Unknown Source) at com.rsa.cryptoj.c.d$l.<init>(Unknown Source) at com.rsa.cryptoj.c.d$d.<init>(Unknown Source) at com.rsa.cryptoj.c.iS$aE.a(Unknown Source) at com.rsa.cryptoj.c.jd.newInstance(Unknown Source) at sun.security.jca.GetInstance.getInstance(GetInstance.java:236) at sun.security.jca.GetInstance.getInstance(GetInstance.java:164) at java.security.SecureRandom.getInstance(SecureRandom.java:277) at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:199) at java.security.SecureRandom.<init>(SecureRandom.java:156) at java.security.AlgorithmParameterGenerator.init(AlgorithmParameterGenerator.java:316) at TestDSAKeyTranslateSunVsCryptoJ_usingDSAGenParameterSpec.main(TestDSAKeyTranslateSunVsCryptoJ_usingDSAGenParameterSpec.java:66)
21-10-2013

This breaks all fusion middleware apps as well.
17-10-2013

ILW HH? = P1 I: High, Breaks Eclipse indexing L: High, Seems to happen every time W: Unknown (High), No known workaround at this time
17-10-2013

Thanks, Alan. I confirmed that it is this changeset that causes the difference in behavior: http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/36b97be47bde I used JDK8 b111 and built a hotspot based on the changeset just before the above one. That run passes. Then synced to the above changeset and rebuilt hotspot. That throws the java.lang.IllegalAccessError.
17-10-2013

Bengt - I fixed the comment.
16-10-2013

Karen - would you mind looking at this? There aren't any libraries changes in b111. Also this feels like it may be related to the runtime changes in JDK-8011311.
16-10-2013

Alan, which runtime changes did you mean? The bug number you reference is the bug number of this bug report.
15-10-2013

To reproduce this with Eclipse I set up the hotspot project as a CDT project and start a rebuild of the index. This gives me the followging stack trace: An internal error occurred during: "C/C++ Indexer". tried to access method java.lang.Object.clone()Ljava/lang/Object; from class org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil
14-10-2013

Note that removing the extra interface lever introduced by ICloneExtend makes the program succeed with both b110 and b111.
14-10-2013