I have a Spring project with Thymeleaf. CategoryController adds "category" object to the spring model. Category has a name field with getters and setters.
The Controller and View works fine for sometime. Everything renders without any issue. However, after about a day, suddenly thymeleaf cannot find name field on the category. At this point, the only way to recover seems is to clear the /tmp/ folder and restart tomcat.
Please note that this issue happens with only this Controller and the "category" object. Other controllers and other model objects continue to render properly.
I have added logs and checked that Controller sets non null category on the model all the time and yet suddenly thymeleaf starts throwing NPE. The fact that clearing /tmp/ folder and restarting application "fixes" this, it seems to be some cache corruption. But I cannot figure out the exact problem.