Search code examples
springjsfwebserverjetty

Jetty webserver after idle breaks


I have a webapp deployed successfully in Jetty webserver. The webserver responds to requests fine. When I access the app it renders the home page. Recently I noticed that when I don't use the app for certain period of time it breaks somehow. The period is somewhere around 2/3 weeks. When I access the webapp after 2/3 weeks of idle I receive this output. If I try to access any other link, i.e. the login page (/login.faces) I receive:

Problem accessing /error/not-found.faces. Reason: /error/not-found.xhtml Not Found in ExternalContext as a Resource

which normally used to work before idling. If I restart the webserver everything returns to normal and works fine. There are scheduled tasks set which make the app interact every day with database. (There is a scheduled task for fetching currency rates via webservice).

Therefore, my question is what would be the cause which breaks the site and makes it unavailable after idling? Is this a webserver (jetty) issue? Am I missing any setting which is crucial?

FYI, the project structure is: Java with Spring, Hibernate, JSF (PrimeFaces) and Jetty


Solution

  • This occurred due to permissions in CentOS. If anyone faces the same issue make sure to check the logs have appropriate permissions to read and write