16

I'm running my Java project in IntelliJ 14.1.1 and I'm using play framework. For some reason I can't compile any part of the code in IntelliJ (even though everything is working perfectly in the play environment). I get this error when trying to compile :

Information:5/26/15, 19:26 - Compilation completed with 1 error and 0 warnings in 1s 165ms
Error:Module 'doorman' production: java.lang.NullPointerException

'doorman' is the name of the project.

Can anyone please help?

Daniel Olszewski
  • 13,995
  • 6
  • 58
  • 65
Nadav Noy
  • 201
  • 1
  • 2
  • 9
  • Is there anything (stacktrace maybe?) in the IntelliJ log? (Main Menu | Help | Show log...) – Meo May 26 '15 at 16:38
  • 1
    Related? https://youtrack.jetbrains.com/issue/SCL-8154 – Meo May 26 '15 at 16:42
  • @Meo the build.log is pretty long but it starts like that: 2015-05-25 11:21:09,529 [ 4082] INFO - .incremental.IncProjectBuilder - Module 'doorman' production: java.lang.NullPointerException org.jetbrains.jps.incremental.ProjectBuildException: Module 'doorman' production: java.lang.NullPointerException at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:945) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:814) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:637) – Nadav Noy May 26 '15 at 17:16
  • it's pretty similar but thing is that my project is written in java and that guys project is in scala so i cant download the plugin offered and fix it that way... – Nadav Noy May 26 '15 at 17:29
  • I have the same problem with Scala plugin 2016.3.8. Replaced with version 2016.3.3 and problem is gone. – Orka Jan 30 '17 at 18:25

8 Answers8

15

For me, it was the "Scala plugin" version 2016.3.4.

Removed it from IDEA and installed 2016.3.3 version.

Then everything started working.

UPDATE [2017-03-06]: With release 2016.3.9 (latest version), the bug is fixed, it seems.

myuce
  • 1,321
  • 1
  • 19
  • 29
  • Yep, 2016.3.4 was the culprit for me too. – PQuinn Dec 02 '16 at 00:39
  • After rolling back, per above, I had to reimport the gradle project and do a full rebuild. – F. P. Freely Dec 05 '16 at 20:31
  • 1
    NB I just took the 2016.3.1 update and it bundled in the scala update; you'll need to roll it back, again. Hopefully, it's still in your downloads folder! – F. P. Freely Dec 14 '16 at 14:50
  • Rollback from 2016.3.5 to 2016.3.3 helped me. – Igor Khrol Dec 22 '16 at 07:08
  • 4
    I got the same error in 2016.3.8. Asked for help on Scala Plugin issue tracker, https://youtrack.jetbrains.com/issue/SCL-11328 In my case the error occurred because I had an empty "output path" in one of modules (visible in File -> Project Structure) - I don't know how it happened. The error can happen even if the configuration is wrong for another module than the one being compiled. – Paweł Chorążyk Feb 06 '17 at 11:51
  • Yup, I can testify that this was solved by installing the latest version of the scala plugin. I had version `2016.3.8` and after upgrading it to version `2016.3.8.16 eap`, the problem disappeared after a restart. – smac89 Feb 28 '17 at 07:52
6

delete ~/.IntellijIdea/system/compile-server/_ usually happens after unexpected shutdown of intellij.

  • This worked for me. However I am on windows so the directory was located here: C:\Users\username\.IdeaIC2018.1\system\compile-server – Ocean Airdrop Apr 30 '18 at 09:58
5

This helped me:

Build->Rebuild project
Elletlar
  • 3,136
  • 7
  • 32
  • 38
Anton Sych
  • 71
  • 1
  • 3
4

I recreated the entire project and imported it and it solved the problem. Couldn't find any way to resolve this issue

Nadav Noy
  • 201
  • 1
  • 2
  • 9
4

This is a bug and it seems they are working on it. You can find a solution here

orestis
  • 932
  • 2
  • 9
  • 23
0

Removing play framework plugin solved the problem for me.

some some
  • 528
  • 7
  • 13
0

For me, I updated Scala plugin to v2016.3.8. It worked for me.

tiennv
  • 356
  • 5
  • 13
0
File -> Invalidate Caches / Restart

Doing this from the menu seems to clean all the secret directories

David Lilljegren
  • 1,799
  • 16
  • 19