Gatling 3.7.4 with Java 17

Hello!

We’re trying to build a gatling framework for Java-17, we’ve done most of the bits i.e.

  1. Use gradle to configure libraries, the Simulation file is done with all API’s passing
Simulation XYZ completed in 420 seconds
Parsing log file(s)...
Parsing log file(s) done
Generating reports...
  1. We have a custom plugin to take care of report generation (done in Simple groovy), we see this
CAPSULE EXCEPTION: class Capsule (in unnamed module @0x1bb6b38b) 
cannot access class 
com.sun.jmx.mbeanserver.JmxMBeanServer (in module java.management)
because module java.management does not 
export com.sun.jmx.mbeanserver to 
unnamed module @0x1bb6b38b (for stack trace, run with -Dcapsule.log=verbose)

Any other details I need to add please let me know, first time posting so do apologise.
Inputs greatly appreciated

Cheers

What are you doing with JMX in a Gatling test exactly?

I tried with the JAR too, looks like the plugin doesn’t for Java 17

$ java -jar -Dcapsule.log=verbose gatling-report-6.0-capsule-fat.jar simulation.log
CAPSULE: Cleanup
CAPSULE EXCEPTION: class Capsule (in unnamed module @0x1e92bd61) cannot access class com.sun.jmx.mbeanserver.JmxMBeanServer (in module java.management) because module java.management does not export com.sun.jmx.mbeanserver to unnamed module @0x1e92bd61
java.lang.IllegalAccessError: class Capsule (in unnamed module @0x1e92bd61) cannot access class com.sun.jmx.mbeanserver.JmxMBeanServer (in module java.management) because module java.management does not export com.sun.jmx.mbeanserver to unnamed module @0x1e92bd61
at Capsule.overridePlatformMBeanServer(Capsule.java:5375)
at Capsule.launch0(Capsule.java:1349)
at Capsule.launch(Capsule.java:1340)
at Capsule.launch(Capsule.java:1270)
at Capsule.main0(Capsule.java:394)
at Capsule.main(Capsule.java:374)
CAPSULE: Cleanup

The issue is with your own Capsule class that does JMX and has nothing to do with Gatling.
Sorry but we can’t help with that.