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

Bug 522388

Summary: Continuous NPEs during Java Build for Java 9 enabled projects
Product: [Eclipse Project] JDT Reporter: Kris De Volder <kdevolder>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: stephan.herrmann
Version: 4.7   
Target Milestone: BETA J9   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
error log
none
configuration details none

Description Kris De Volder CLA 2017-09-15 17:46:09 EDT
Created attachment 270234 [details]
error log

Trying to build spring-boot projects from master, with Java 9 support, causes numerous NPEs during the build. See attached error log.

Steps:

1. Obtain the source code:

Clone and checkout the spring boot source code as per below:

git clone git@github.com:kdvolder/spring-boot.git
git checkout java9-tryout

2. Setup Eclipse with J9 support as follows:

- Download eclipse-java-oxygen-1-RC3-linux-gtk-x86_64.tar.gz
(I got it here exactly: http://mirror.math.princeton.edu/pub/eclipse//technology/epp/downloads/release/oxygen/1.RC3/eclipse-java-oxygen-1-RC3-linux-gtk-x86_64.tar.gz)

- Install the Java 9 Support for Oxygen Beta from marketplace.

- Open new workspace and Configure a Java 9 JDK as workspace JRE. I used this one:  

jdk-9-ea-181/bin$ ./java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

3. Import spring-boot code into workspace. 

Import using 'Existing Maven Projects' wizard. Point at root dir of the git repo. Import all projects.

=> Things seem to go well for a while and then a bunch of NPEs are logged and error popups start to happen. The error popups do not seem to stop and just keep coming, until I close Eclipse.

See attached error log for the first few errors that got logged.
Comment 1 Kris De Volder CLA 2017-09-15 17:49:21 EDT
Created attachment 270235 [details]
configuration details

Attaching full configuration dump of my Eclipse install, just in case any of the info in it is relevant/useful.
Comment 2 Stephan Herrmann CLA 2017-09-15 18:07:03 EDT
Hi Kris,

From the stack trace this is likely the same as bug 521847, and from your installation details I can see that you have JDT/Core from v20170826-0521_BETA_JAVA9, i.e., you don't have the fix which I pushed on 2017-09-05

Please re-open if it still happens with a build containing that fix.

Until the entry on MarketPlace is refreshed I believe you could update from this temporary URL: http://build.eclipse.org/eclipse/builds/4P/siteDir/updates/4.7-P-builds/P20170911-2315/

*** This bug has been marked as a duplicate of bug 521847 ***