Post Tomcat 8.0.53, when I install Tomcat (9.0.30 or 8.5.50) and install it as service (Using service.bat), it gets installed but with "Log on" as "Local Service" instead of "Local System account".
This can be seen under services in windows.
Because of this, when I run the service, the application is not able to read a file.
If I manually go to services, open properties for my service, then change the Log on as "Local System" and save, everything works perfectly.
This appears to be a result of these issues: 55969 and 63310. The update to Commons Daemon 1.2.0 seems to be the cause, and it does not appear that one can modify this setting during installation.
However, it can be set to Local System afterwards from an administrator command prompt with the following command:
sc config Tomcat8 obj=LocalSystem
Given workaround works fine! I just didn't get time to answer my question. Also, Since there was only one file which was an issue while reading it, i changed the file permission using icacls/cacls windows command and then the application worked fine even with tomcat running as window's service with LocalService account.
Glad it worked for you as well! Thanks for marking this as the answer. I uncovered a bit more information, so I'll update my answer.