java.lang.IllegalAccessError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Apache reported the following regression issue with jdk 8 ea b111: Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class TestCloneInterface at TestCloneInterface.test(TestCloneInterface.java:15) at TestCloneInterface.main(TestCloneInterface.java:19) The testcase TestCloneInterface.java is attached. Testcase appear to pass with jdk 8 ea b109 (and b110). Below is email from Apache: ---------------------------------------------------------------------------------------------------- Hi, I was able to reproduce with a simple test case that emulates the UIMA code. See attached test case, just compile it with any JDK and run with b111: With Java 7 or JDK8b109: > javac TestCloneInterface.java > java TestCloneInterface > With JDK8b111: > java TestCloneInterface Exception in thread "main" java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class TestCloneInterface at TestCloneInterface.test(TestCloneInterface.java:15) at TestCloneInterface.main(TestCloneInterface.java:19) > The bug happens if the clone() method is declared in a superinterface only. Without the additional interface inbetween, test passes. Instead of the real interface (the "o" local variable, which is of type "FoobarIntf") it checks access flags on "this", which is of type "TestCloneInterface". Uwe ----- Uwe Schindler uschindler@apache.org Apache Lucene PMC Chair / Committer Bremen, Germany http://lucene.apache.org/ -----------------------------------------------------------------------------------------------------------------
    via by Balchandra Vaidya,
    • java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase at __randomizedtesting.SeedInfo.seed([BC36C2DC5FC6C107:4A94D14D35381F88]:0) at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.initialize(AnalysisEngineImplBase.java:163) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:127) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:267) at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:335) at org.apache.lucene.analysis.uima.ae.BasicAEProvider.getAE(BasicAEProvider.java:73) at org.apache.lucene.analysis.uima.BaseUIMATokenizer.analyzeInput(BaseUIMATokenizer.java:63) at org.apache.lucene.analysis.uima.UIMAAnnotationsTokenizer.initializeIterator(UIMAAnnotationsTokenizer.java:60) at org.apache.lucene.analysis.uima.UIMAAnnotationsTokenizer.incrementToken(UIMAAnnotationsTokenizer.java:74) at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:98)
    No Bugmate found.