After installing JasperReports 8.1 on Windows 2019 with ApacheTomcat 9.0.71 and PostgreSQL12.13, the installation was successful but when I start ApacheTomcat9.0.71 as a Windows Service it does not start and the following error is found in the log:
HTTP Status 404 – Not Found
Type Status Report
Message The requested resource [/jasperserver-pro/login.html] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Starting Apache directly from 'starup.bat' does start and allows access to JasperReports.
Release : 14.4
There are both user profile and potential issues memory with the default memory configuration.
The initial startup issue may have been related to the User Profile, setting the Service to 'Logon As' the Admin user that did the initial installation might be all that is necessary to get the Service to work correctly.
This was not enough in at least one environment, and the memory configuration had to be adjusted.
With the 'Initial memory pool:', 'Maximum memory pool:' and 'Thread stack size:' in 'JAVA' tab of tomcat properties as default shown below-
Initial memory pool: 128
Maximum memory pool: 256
Thread stack size:
The service starts with the following error in catalina log, and Jasper is not available:
01-Feb-2023 07:25:55.575 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
01-Feb-2023 07:25:55.575 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/jasperserver-pro] startup failed due to previous errors
Updating the memory pool and thread size as shown below, the service start correctly and allows JasperReports run:
Initial memory pool: 4096
Maximum memory pool: 6144
Thread stack size: 6144
If you receive a license error:
'License Failed Invalid license. License file C:\WINDOWS\ServiceProfiles\LocalService\jasperserver.license was not found. Please contact Jaspersoft Technical Support'
Please review KB 45578 https://knowledge.broadcom.com/external/article/45578/jaspersoft-reports-server-license-expire.html
and set -Djs.license.directory to point to the installation folder of \jasperserver-pro\ as detailed in KB 45578
For example from above screenshot: -Djs.license.directory=D:\Apache-Tomcat-9.0\webapps\jasperserver-pro