After installing Tomcat 9 and Jaspersoft, and then configuring Tomcat to run as a service, Jaspersoft won't work, but if we run Tomcat in foreground (with “startup.bat”) it works with no problems. We have verified the license file is in the correct place
Catalina.<date>log says:
29-May-2023 11:52:24.475 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
29-May-2023 11:52:42.084 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
29-May-2023 11:52:42.084 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/reportservice] startup failed due to previous errors
Release : 16.1.1
Jaspersoft: 7.8
First, check to be sure that the version of Apache Tomcat being used has been tested certified with Jaspersoft 7.8. This page from the documentation provides the detail:
Platform Support Jaspersoft 7.8
The below configuration is for the Tomcat version 9.0.65
If Tomcat has already been installed as a Windows service, it is best to uninstall it so that no Tomcat services are found in the Windows services list. Instructions for this can be found here: https://tomcat.apache.org/tomcat-9.0-doc/windows-service-howto.html#Command_line_arguments
Use the %CATALINA_HOME%\bin\service.bat script with parameter "install" to install Tomcat as a service. The default service name using this method is "Tomcat9".
Use the %CATALINA_HOME%\bin\tomcat9w.exe application to complete the service configuration (tomcat9w.exe //ES//Tomcat9) and set up all the Java details:
Use below configuration
JVM: C:\App\jdk-11.0.9.1+1\bin\server\jvm.dll
Java Classpath: C:\App\Jaspersoft\apache-tomcat-9.0.65\bin\bootstrap.jar;C:\App\Jaspersoft\apache-tomcat-9.0.65\bin\tomcat-juli.jar
Java Options:
-Dcatalina.home=C:\App\Jaspersoft\apache-tomcat-9.0.65
-Dcatalina.base=C:\App\Jaspersoft\apache-tomcat-9.0.65
-Dignore.endorsed.dirs=C:\App\Jaspersoft\apache-tomcat-9.0.65\endorsed
-Djava.io.tmpdir=C:\App\Jaspersoft\apache-tomcat-9.0.65\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\App\Jaspersoft\apache-tomcat-9.0.65\conf\logging.properties
-Djs.license.directory=C:\Users\Administrator
-XX:MetaspaceSize=32m
-Xss2m
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
Java9 Options:
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
Initial memory pool: 1024MB
Maximum memory pool: 2048MB
Thread stack size:2048
Then clicked “Apply” and “OK”.
The license file should be copied into the “C:\Windows\ServiceProfiles\LocalService” folder.
When all this configuration has been completed, start the Tomcat9 service and then watch the %CATALINA_HOME%\log\catalina<date>.log file to verify all aspects of Tomcat start up correctly.