Could not create the Java Virtual Machine while running mvn gatling:recorder

I am getting below error when I run mvn gatling:recorder .
the same issue happening for mvn gatling:test as well .

. Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

rameshallamsetti@Rameshs-MBP ~ % scalac --version

Scala compiler version 3.2.2 – Copyright 2002-2023, LAMP/EPFL

rameshallamsetti@Rameshs-MBP ~ % scala -version

Scala code runner version 3.2.2 – Copyright 2002-2023, LAMP/EPFL

rameshallamsetti@Rameshs-MBP ~ % mvn --version

Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)

Maven home: /Users/rameshallamsetti/Downloads/apache-maven-3.8.7

Java version: 19.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home

Default locale: en_IN, platform encoding: UTF-8

OS name: “mac os x”, version: “12.6”, arch: “x86_64”, family: “mac”

You’re using a very outdated version of the gatling-maven-plugin that’s not compatible with Java 19. Please upgrade to the latest version.

Thank you @slandelle After I upgrade the maven plugin version to 4.3.0 my issue is resolved. Also I added the scala-maven-plugin.version in the pom.xml to run my tests
<gatling-maven-plugin.version>4.3.0</gatling-maven-plugin.version>
<scala-maven-plugin.version>4.8.1</scala-maven-plugin.version>

FYI, you can check our demo project for maven+scala: GitHub - gatling/gatling-maven-plugin-demo-scala: Showcase of the Gatling Plugin for Maven + Scala

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.