3

I'm having an error while trying to make Eclipse Oxygen work in Kubuntu 16.04. Whenever I open a file, and sometimes on Eclipse startup too even if there's no open ones, I get many errors, in particular some I can't copy that occur when I try to use code completion, and most of all this one:

Errors occurred during the build.
Errors running builder 'Java Builder' on project 'MyFirstAfterReinstallAndPlugin'.
java.lang.NullPointerException

I have to specify that this started to occur after I downloaded the extension for Java 9 support and created a new project with the Java_SE9 JRE: before that it would behave in another strange way. Code correction wouldn't find the "System" class and a lot of strange errors happened. I have installed openjdk9 and javac from command line works fine. Plus Eclipse said that I had to have Java 1.8 or superior, making the fact that it didn't work before strange as well.

I've tried everything I found online but still can't figure this out.

halfer
  • 19,824
  • 17
  • 99
  • 186
Eärendil Baggins
  • 552
  • 1
  • 8
  • 23
  • 1
    1. The stack trace isn't complete. 2. Did you check for duplicates? 3. Eclipse Oxygen.1a (4.7.1a) is scheduled to be released on 11th October (2017) with full Java 9 support. – Naman Oct 06 '17 at 01:17
  • 1
    For (2) above -- https://stackoverflow.com/questions/43706933/eclipse-oxygen-java-9 ; https://stackoverflow.com/questions/46453241/choosing-jre-runtime-environment-in-java-9-in-eclipse-oxygen-version ; https://stackoverflow.com/questions/43165556/with-java-9-ea-eclipse-fails-to-install-and-show-error-an-error-has-occurred ; https://stackoverflow.com/questions/46336547/how-to-get-eclipse-oxygen-to-run-on-java-9 – Naman Oct 06 '17 at 01:18
  • @nullpointer how do I print the stack trace? – Eärendil Baggins Oct 06 '17 at 03:33
  • @nullpointer also, the official Eclipse website suggests to use the Java 9 plugin, I thought it was alright. – Eärendil Baggins Oct 06 '17 at 03:35
  • You could try an [Oxygen.1a release candidates](http://www.eclipse.org/downloads/index-developer.php). Note that there is a known Java 9 problem when you use Maven (which will be fixed in the final Oxygen.1a release). – howlger Oct 06 '17 at 08:05
  • 1
    Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Oct 06 '17 at 12:14
  • 1
    To understand which exact problem you are facing we need more information regarding the NullPointerException. Please provide details from either (a) the Error Log view or (b) file `.metadata/.log` inside your workspace folder (both locations having the same information). – Stephan Herrmann Oct 07 '17 at 12:37
  • @StephanHerrmann too bad I reinstalled it all and sticked with it working with Java 8 as it was something I needed to work quickly, I guess I'm gonna post that if I try and get the same error again – Eärendil Baggins Oct 08 '17 at 21:51
  • @StephanHerrmann I'm facing a similar issue. Can you help me with this. The following is what i found in my log: !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ui". !STACK 1 Java Model Exception: org.eclipse.core.runtime.AssertionFailedException: null argument: at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:326) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:348) – Ananthu K Kumar Sep 27 '21 at 09:42
  • @WadeWatts please file a bug at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT - the report should contain the exact version of Eclipse and the full stack trace of the exception. Also the steps that led to the exception might be necessary for analysis. – Stephan Herrmann Sep 28 '21 at 15:41

7 Answers7

2

Look here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=498755

Thanks for the report. This has been fixed recently. You may want to try a recent build from http://download.eclipse.org/eclipse/downloads/

This bug has been marked as a duplicate of bug 496675

SUGGESTIONS:

  1. Try the latest/greatest update to Eclipse Oxygen

    ... OR ...

  2. If that doesn't work, try an OLDER version (e.g. Neon, or even Mars2)

paulsm4
  • 114,292
  • 17
  • 138
  • 190
1

I solved this problem simply by deleting the project causing the trouble, and then re-importing it in Eclipse.

  1. Delete the project from the Eclipse workspace.
    (i) Simply 'remove' the project: not delete its files !!

    PROCESS:

    • Right-clic on the project to delete.
    • Context-menu :>Delete
    • DO NOT 'Delete project contents on disk' !!
  2. Then, reimport the project.

    PROCESS:

    • menu :>File/>Import
    • />Existing Project into Workspace
    • ...
Wiitry
  • 19
  • 4
0

Eclipse Oxygen.1a (4.7.1a) Release

Update as of 11 October,2017 - You can upgrade to the latest eclipse package Eclipse Oxygen.1a (4.7.1a) which is now released and supports Java 9.

Naman
  • 27,789
  • 26
  • 218
  • 353
0

I was also getting the following error. To fix this I changed the Build class path order so that the JRE was listed last. (Project Properties>Java Build Path>Order and Export) Errors running builder 'Java Builder' java.lang.NullPointerException on project X

0

*solved

I faced same issue Recent code change had caused the compilation issue and this compilation was not shown in eclipse as the java file has 7K lines and build was failing.

I moved the methods to new file. Then compilation errors were shown by eclipse.

I fixed the code and build was successful.

0

I was getting the same error, after searching up for the answer I tried to do the following:

1.) I created back up of my project on the disc.

2.) Deleted the project that was causing the problems(for me it was 1 of 9 projects).

3.) At last I reimported the project from the remote repository & the problem was solved

4.OPTIONAL) I did merge the changes that Ive had to the current project with the backed up version.

0

I have run into this problem when I was updating the the newest version of Eclipse (Photon) using the updater from OOMPH.It already struck me that reloading the target did not follow the usual steps and was finished quite quickly, but it didn't make the problems mentioned above go away. Also the solutions mentioned above did not work. As it transpired, I had JAVA 8 installed on my system, and Photon requires JAVA 11 or up. Wven I manually updated my system to the newest JAVA system, and added:

-vm C:\Program Files\Java\jdk-15.0.2\bin

to the eclipse.ini file in the Eclipse folder, the problem was resolved

keesp
  • 301
  • 2
  • 13