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:
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:
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.