Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 534125

Summary: Null pointer exception in ClassFileReader
Product: [Eclipse Project] JDT Reporter: Niranjan Rao <nhrdls>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, stephan.herrmann
Version: 4.7.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
Eclipse log file none

Description Niranjan Rao CLA 2018-04-26 21:17:36 EDT
Created attachment 273819 [details]
Eclipse log file

This problem started appearing after updating to Java 9.0.4 from Java 8. Before this code was compiling fine in eclipse. It still does compile on command line using java 9. Only eclipse is choking. Actual platform Spring tool suite  3.9.2  Eclipse Oxygen.3a (4.7.3a), On Ubuntu 16.04, JDK 9.0.4. Attached logs show null pointer exception in ClassFileReader.

I have asked same question at https://stackoverflow.com/questions/50032993/eclipse-keeps-complaining-about-abstract-class-jdk-9-issue which has screenshot of compiler errors showing up.

I have two classes implementing interface org.openqa.selenium.WebElement. Eclipse IDE keeps complaining 

The method sendKeys(CharSequence...) of type JavaScriptDriver.JSWebElement must override or implement a supertype method JavaScriptDriver.java /selenium-shared/src/main/java/com/finovera/downloader/driver line 287 Java Problem

The type JavaScriptDriver.JSWebElement must implement the inherited abstract method WebElement.sendKeys(CharSequence...) JavaScriptDriver.java /selenium-shared/src/main/java/com/finovera/downloader/driver line 98 Java Problem

The methods are declared properly and as said above, it does compile at command line.

Tried to create isolated test case. But new implementation of interface compiles fine. However if same code is copied to problematic classes, compilation fails. Any steps to create test case will be great.

I commented existing sendKeys function and asked eclipse to create the function. It did create the function and then starts showing complination error.
Comment 1 Stephan Herrmann CLA 2018-04-27 10:49:02 EDT
Some interesting stack frames from the error log:

----------
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody0(CompilationUnitProblemFinder.java:210)
	at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder$AjcClosure1.run(CompilationUnitProblemFinder.java:1)
	at org.eclipse.contribution.jdt.itdawareness.ITDAwarenessAspect.ajc$around$org_eclipse_contribution_jdt_itdawareness_ITDAwarenessAspect$4$8b05d765proceed(ITDAwarenessAspect.aj:231)
	at org.eclipse.contribution.jdt.itdawareness.ITDAwarenessAspect.ajc$around$org_eclipse_contribution_jdt_itdawareness_ITDAwarenessAspect$4$8b05d765(ITDAwarenessAspect.aj:244)
---------

This is AJDT (AspectJ). Please test if the same problem also occurs without AJDT installed, TIA.
Comment 2 Stephan Herrmann CLA 2018-04-27 10:50:11 EDT
(In reply to Stephan Herrmann from comment #1)
> This is AJDT (AspectJ). Please test if the same problem also occurs without
> AJDT installed, TIA.

Alternatively, already disabling JDT-Weaving in the preferences could give more information.
Comment 3 Niranjan Rao CLA 2018-04-27 12:41:44 EDT
(In reply to Stephan Herrmann from comment #2)
> (In reply to Stephan Herrmann from comment #1)
> > This is AJDT (AspectJ). Please test if the same problem also occurs without
> > AJDT installed, TIA.
> 
> Alternatively, already disabling JDT-Weaving in the preferences could give
> more information.

Disabling JDT Weaving did not solve the problem.

On the other hand my teammates tested on STS 3.9.2.RELEASE Eclipse Oxygen.2 (4.7.2) on Ubuntu 16.04, JDK 9.0.4 and it's working fine. So something changed between 4.7.2 and 4.7.3a
Comment 4 Stephan Herrmann CLA 2018-05-08 08:04:05 EDT
Looking at the error messages and versions, this _could_ be related to bug 533348, which was fixed for 4.8 M7 (via bug 532137).
You may want to re-test using a recent I-build [1] or else wait for M7 to be released.


http://download.eclipse.org/eclipse/downloads/index.html#4.8_Integration_Builds
Comment 5 Eclipse Genie CLA 2020-05-15 13:21:45 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.