I just imported a Java EE project that I made about a year ago. But after I imported it, i get this error in the first line of one of the files:

Internal compiler error: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:148)

error in first line of file

I am able to run the project on the server but it doesn't work, the website won't show up.

I tried removing the first line but I still get the same error.

I also get the same error during building.

There is no other error in the code, I can't post the entire code because it's around 3000 lines long.

Here is the project hierarchy:

project hierarchy

2

There are 2 best solutions below

0
AudioBubble On

This is an Eclipse Bug. http://download.eclipse.org/eclipse/downloads/#4.8_Integration_Builds (Use newer than 2018-06-16).

Check your eclipse version in the above comment link and the NPE Should be gone.

0
Jennifer Thomas On

I had the same problem and it turns out I was using lombok 1.18.18 and this version has a known issue: https://github.com/projectlombok/lombok/issues/2752