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?
In Java, the java. lang. NullPointerException is thrown when a reference variable is accessed (or de-referenced) and is not pointing to any object. This error can be resolved by using a try-catch block or an if-else condition to check if a reference variable is null before dereferencing it.
The java. lang. NullPointerException is a runtime exception in Java that occurs when a variable is accessed which is not pointing to any object and refers to nothing or null. Since the NullPointerException is a runtime exception, it doesn't need to be caught and handled explicitly in application code.
How to avoid the NullPointerException? To avoid the NullPointerException, we must ensure that all the objects are initialized properly, before you use them. When we declare a reference variable, we must verify that object is not null, before we request a method or a field from the objects.
NullPointerException is a runtime exception and it is thrown when the application try to use an object reference which has a null value. For example, using a method on a null reference.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With