I deployed a Spring MVC Java web application on Centos 6 with Apache Tomcat 8 and MySQL. The application worked perfectly for a few weeks but then the next and previous buttons used to naviagte through the database resultset started causing java.lang.NullPointerException problems. The issue does not occur in my test environment where the application works fine. When the next/previous button is pressed the clientsNavigateToPage method is called and loads the next list of products. I will include the stacktrace and code below and hopefully someone can help me out with this issue.
HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException
type Exception report
message Request processing failed; nested exception is java.lang.NullPointerException
description The server encountered an internal error that prevented it from fulfilling this request.