-1

Apr 06, 2018 3:15:29 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet dispatcher threw exception java.lang.NullPointerException

Here is my code:

I am getting nullPointerException at second yellow line. enter image description here

1 Answers1

0

Firstly, you have not initialised the encryptPassword variable so it is null by default, causing encryptPassword.decrypt to throw an exception.

Another possible cause is that properties.getProperty("database.password") is returning null, which you're then passing into encryptPassword.decrypt which expects a non-null argument.

mgthomas99
  • 5,402
  • 3
  • 19
  • 21