Jaspersoft 9 does not run as Windows Service with Java 17.0.x
search cancel

Jaspersoft 9 does not run as Windows Service with Java 17.0.x

book

Article ID: 380946

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Jaspersoft starts correctly with startup.bat, but fails as a Windows Service, although everything is configured correctly. Error when starting the service in Services:

Service error: Windows could not start the Apache Tomcat JasperReports on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor and refer to service-specific error code 4.

Error seen in $Tomcat9\logs\commons-daemon.2024-10-30

[2024-10-30 18:27:56] [info]  [ 8560] Apache Commons Daemon procrun finished.
[2024-10-30 18:56:44] [info]  [12580] Apache Commons Daemon procrun (1.3.4.0 64-bit) started.
[2024-10-30 18:56:44] [info]  [12580] Running Service 'JasperReports'...
[2024-10-30 18:56:44] [info]  [ 1208] Starting service...
[2024-10-30 18:56:44] [error] [ 9204] CreateJavaVM Failed with error [-6]
[2024-10-30 18:56:44] [error] [ 9204] The system cannot find the file specified.
[2024-10-30 18:56:44] [error] [ 1208] Failed to start Java
[2024-10-30 18:56:44] [error] [ 1208] ServiceStart returned 4.

Java version is Adoptium Temurin 17.0.12+7

Environment

  • Jaspersoft 9 with Java 17.0.x 

Cause

Unsupported JVM parameters 

  • Unrecognized VM option 'UseConcMarkSweepGC'
  • Unrecognized VM option 'CMSClassUnloadingEnabled'

Resolution

  1. Run the command to edit the JasperReports service:
    $JasperTomcat9\bin>
    tomcat9w.exe //ES//JasperReports
  2. In Java Tab, in Java Options field, remove the below JVM parameters:
    -XX:+UseConcMarkSweepGC
    -XX:+CMSClassUnloadingEnabled
  3. Save and apply
  4. Now attempt starting the Windows Service again