Error NumberFormatException: Not a version: 9 with gatling-maven-plugin:2.2.4

Hi,

I have update my project from scala 2.11.6 to 2.12.4. In order to make it work I also had to update gatling from 2.1.7 to 2.2.4. I fixed all compilation errors and deprecations and feature warnings.

However now, I have the error java.lang.NumberFormatException: Not a version: 9 throw by gatling which I have no clue what is the cause (I’m not using java 1.9 but java 1.8.0_162)

Does anyone could have a clue of what means this error? Thanks

Caused by: java.lang.NumberFormatException: Not a version: 9
at scala.util.PropertiesTrait.parts$1(Properties.scala:186)
at scala.util.PropertiesTrait.isJavaAtLeast(Properties.scala:189)
at scala.util.PropertiesTrait.isJavaAtLeast$(Properties.scala:183)
at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala:157)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala)
… 37 more

Old versions:

  • Scala:2.11.6
  • captest:2.0.0 → internal lib
  • org.scalaj:scalaj-http_2.11:2.3.0

New versions:

  • Scala:2.12.4

  • <gatling.maven.plugin.version>2.1.7</gatling.maven.plugin.version>

  • captest:2.1.0 → internal lib

  • org.scalaj:scalaj-http_2.12:2.3.0

Here the captest 2.1.0 internal library versions:

  • <gatling.maven.plugin.version>2.2.4</gatling.maven.plugin.version>

  • org.scalatest:scalatest_2.12:3.0.5

  • org.scala-lang:scala-reflect:2.12.4

  • io.gatling:gatling-core:2.3.1

  • io.gatling.highcharts:gatling-charts-highcharts:2.3.1

  • io.gatling:gatling-app:2.3.1

  • io.gatling:gatling-http:2.3.1

  • com.typesafe:config:1.2.1

  • mysql:mysql-connector-java:5.1.46

  • org.jolokia:jolokia-client-java:1.5.0

  • org.slf4j:slf4j-api:1.7.25

  • com.typesafe.scala-logging:scala-logging_2.12:3.7.2

  • org.scalaj:scalaj-http_2.12:2.3.0

Here complete stacktrace:

[INFO] — gatling-maven-plugin:2.2.4:integration-test (EvBPublish) @ projet-captest —
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sbt.compiler.RawCompiler.apply(RawCompiler.scala:33)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:159)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:155)
at sbt.IO$.withTemporaryDirectory(IO.scala:358)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:155)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:152)
at sbt.IO$.withTemporaryDirectory(IO.scala:358)
at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:152)
at sbt.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:58)
at com.typesafe.zinc.Compiler$.compilerInterface(Compiler.scala:154)
at com.typesafe.zinc.Compiler$.create(Compiler.scala:55)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:147)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:36)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
… 6 more
Caused by: java.lang.ExceptionInInitializerError
at scala.tools.nsc.util.package$.(package.scala:127)
at scala.tools.nsc.util.package$.(package.scala)
at scala.tools.nsc.Global.throwableAsString(Global.scala:284)
at scala.tools.nsc.Global.reportThrowable(Global.scala:283)
at scala.tools.nsc.Driver.process(Driver.scala:58)
at scala.tools.nsc.Main.process(Main.scala)
… 31 more
Caused by: java.lang.NumberFormatException: Not a version: 9
at scala.util.PropertiesTrait.parts$1(Properties.scala:186)
at scala.util.PropertiesTrait.isJavaAtLeast(Properties.scala:189)
at scala.util.PropertiesTrait.isJavaAtLeast$(Properties.scala:183)
at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala:157)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala)
… 37 more

You’re using Java 9, not Java 8. Really.
And Gatling 2.2 was targeting Scala 2.11, not 2.12. You’d need latest Gatling 2.3.1.

java 8 and gatling 2.3

It looks like you hit this error: https://github.com/scala-js/scala-js/issues/2798
There is a fix in that issue.

No really. Gatling 2.3 doesn’t support Java 9 because of the ClassLoader changes. Gatling 3 does. Period.

The NumberFormatException because somewhere someone tries to parse the java.version System property and that it crashes on the “9” value that doesn’t look like previous pattern (“1.5”, “1.6”, “1.7”, “1.8”).
David Prévost is actually using Java 9 and not Java 8, 100% sure.

I’m not sure how my project can use Java 9, I do not want Java 1.9. I referencing to Java 1.8 in both maven and IntelliJ (which I also use with my scala project)

dprevost@dprevost-ubuntu:~$ echo $JAVA_HOME
/home/dprevost/software/jdk1.8.0_92

dprevost@dprevost-ubuntu:~$ java -version
openjdk version “1.8.0_162”
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-0ubuntu0.17.10.2-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

dprevost@dprevost-ubuntu:~$ mvn -version
Apache Maven 3.5.0
Maven home: /usr/share/maven
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: /home/dprevost/mfxdev-snapshot/software/jdk1.8.0_92/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: “linux”, version: “4.13.0-38-generic”, arch: “amd64”, family: “unix”

dprevost@dprevost-ubuntu:~/git/api-captest$ mvn clean install -X
Apache Maven 3.5.0
Maven home: /usr/share/maven
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: /home/dprevost/mfxdev-snapshot/software/jdk1.8.0_92/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: “linux”, version: “4.13.0-38-generic”, arch: “amd64”, family: “unix”
[DEBUG] Created new class realm maven.api

/home/dprevost/.m2/repository/io/gatling/gatling-maven-plugin/2.2.4/gatling-maven-plugin-2.2.4.jar
[DEBUG] [/home/dprevost/mfxdev-snapshot/software/jdk1.8.0_92/jre/bin/java, -jar, /tmp/gatlingbooter17717027318574250.jar, io.gatling.compiler.ZincCompiler, /tmp/gatling-maven-plugin-1983553804615428312.args]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sbt.compiler.RawCompiler.apply(RawCompiler.scala:33)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:159)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:155)
at sbt.IO$.withTemporaryDirectory(IO.scala:358)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:155)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:152)
at sbt.IO$.withTemporaryDirectory(IO.scala:358)
at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:152)
at sbt.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:58)
at com.typesafe.zinc.Compiler$.compilerInterface(Compiler.scala:154)
at com.typesafe.zinc.Compiler$.create(Compiler.scala:55)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:147)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:36)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
… 6 more
Caused by: java.lang.ExceptionInInitializerError
at scala.tools.nsc.util.package$.(package.scala:127)
at scala.tools.nsc.util.package$.(package.scala)
at scala.tools.nsc.Global.throwableAsString(Global.scala:284)
at scala.tools.nsc.Global.reportThrowable(Global.scala:283)
at scala.tools.nsc.Driver.process(Driver.scala:58)
at scala.tools.nsc.Main.process(Main.scala)
… 31 more
Caused by: java.lang.NumberFormatException: Not a version: 9
at scala.util.PropertiesTrait.parts$1(Properties.scala:186)
at scala.util.PropertiesTrait.isJavaAtLeast(Properties.scala:189)
at scala.util.PropertiesTrait.isJavaAtLeast$(Properties.scala:183)
at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala:157)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala)
… 37 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.372 s
[INFO] Finished at: 2018-04-11T10:59:10-04:00
[INFO] Final Memory: 19M/369M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.2.4:integration-test (EvBPublish) on project captest: Gatling failed.: Simulations compilation failed. Process exited with an error: 255 (Exit value: 255) → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.gatling:gatling-maven-plugin:2.2.4:integration-test (EvBPublish) on project captest: Gatling failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Gatling failed.
at io.gatling.mojo.GatlingMojo.execute (GatlingMojo.java:219)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: io.gatling.mojo.CompilationException: Simulations compilation failed.
at io.gatling.mojo.GatlingMojo.executeCompiler (GatlingMojo.java:267)
at io.gatling.mojo.GatlingMojo.execute (GatlingMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 255 (Exit value: 255)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:402)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:164)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:151)
at io.gatling.mojo.Fork.run (Fork.java:120)
at io.gatling.mojo.GatlingMojo.executeCompiler (GatlingMojo.java:265)
at io.gatling.mojo.GatlingMojo.execute (GatlingMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

Also sorry but I give the wrong Gatling version above we should read :

Old versions:

  • Scala:2.11.6

  • <gatling.maven.plugin.version>2.1.7</gatling.maven.plugin.version>

  • captest:2.0.0 → internal lib

  • org.scalaj:scalaj-http_2.11:2.3.0

New versions:

  • Scala:2.12.4

  • <gatling.maven.plugin.version>2.2.4</gatling.maven.plugin.version>

  • captest:2.1.0 → internal lib

  • org.scalaj:scalaj-http_2.12:2.3.0

I will try Gatling 2.3…

I review my project and I was already using gatling 2.3.1 through my internal library. I’m still confuse on how my project can be using Java 1.9! I search on my machine for any java installation using “find / -name jconsole” and I found only two installations that was on version 1.8 (one for my development in my home and the other for docker stuff)

Internal lib pulling gatling version user

  • io.gatling:gatling-core:2.3.1

  • io.gatling.highcharts:gatling-charts-highcharts:2.3.1

  • io.gatling:gatling-app:2.3.1

  • io.gatling:gatling-http:2.3.1
    Below are the dependencies that Intellij resolved from my pom.xml:

Dependencies

  • com.ticketmaster.international.mfx.libraries:captest:2.1.0

  • org.scalatest:scalatest_2.12:3.0.5

  • org.scala-lang:scala-reflect:2.12.4

  • io.gatling:gatling-core:2.3.1

  • io.gatling.highcharts:gatling-charts-highcharts:2.3.1

  • io.gatling:gatling-app:2.3.1

  • io.gatling:gatling-http:2.3.1

  • com.typesafe:config:1.2.1

  • mysql:mysql-connector-java:5.1.46

  • org.jolokia:jolokia-client-java:1.5.0

  • org.slf4j:slf4j-api:1.7.25

  • com.typesafe.scala-logging:scala-logging_2.12:3.7.2

  • org.scalaj:scalaj-http_2.12:2.3.0- org.scalaj:scalaj-http_2.12:2.3.0

  • org.scala-lang:scala-library:2.12.0

Which error/stacktrace do you have one upgraded to Gatling 2.3.1?

Sorry I forgot the good part of the stack.

Caused by: java.lang.NumberFormatException: Not a version: 9

at scala.util.PropertiesTrait.parts$1(Properties.scala:186)
at scala.util.PropertiesTrait.isJavaAtLeast(Properties.scala:189)
at scala.util.PropertiesTrait.isJavaAtLeast$(Properties.scala:183)
at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala:157)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala)
… 37 more

Here the complete stack:

[DEBUG] [/home/dprevost/dev-snapshot/software/jdk1.8.0_92/jre/bin/java, -jar, /tmp/gatlingbooter5250988041657315394.jar, io.gatling.compiler.ZincCompiler, /tmp/gatling-maven-plugin-6593187443960817861.args]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sbt.compiler.RawCompiler.apply(RawCompiler.scala:33)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:159)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:155)
at sbt.IO$.withTemporaryDirectory(IO.scala:358)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:155)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:152)
at sbt.IO$.withTemporaryDirectory(IO.scala:358)
at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:152)
at sbt.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:58)
at com.typesafe.zinc.Compiler$.compilerInterface(Compiler.scala:154)
at com.typesafe.zinc.Compiler$.create(Compiler.scala:55)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:147)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:36)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
… 6 more
Caused by: java.lang.ExceptionInInitializerError
at scala.tools.nsc.util.package$.(package.scala:127)
at scala.tools.nsc.util.package$.(package.scala)
at scala.tools.nsc.Global.throwableAsString(Global.scala:284)
at scala.tools.nsc.Global.reportThrowable(Global.scala:283)
at scala.tools.nsc.Driver.process(Driver.scala:58)
at scala.tools.nsc.Main.process(Main.scala)
… 31 more
Caused by: java.lang.NumberFormatException: Not a version: 9
at scala.util.PropertiesTrait.parts$1(Properties.scala:186)
at scala.util.PropertiesTrait.isJavaAtLeast(Properties.scala:189)
at scala.util.PropertiesTrait.isJavaAtLeast$(Properties.scala:183)
at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala:157)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala)
… 37 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.877 s
[INFO] Finished at: 2018-04-11T14:17:51-04:00
[INFO] Final Memory: 19M/363M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.2.4:integration-test (EvBPublish) on project captest: Gatling failed.: Simulations compilation failed. Process exited with an error: 255 (Exit value: 255) → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.gatling:gatling-maven-plugin:2.2.4:integration-test (EvBPublish) on project captest: Gatling failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Gatling failed.
at io.gatling.mojo.GatlingMojo.execute (GatlingMojo.java:219)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: io.gatling.mojo.CompilationException: Simulations compilation failed.
at io.gatling.mojo.GatlingMojo.executeCompiler (GatlingMojo.java:267)
at io.gatling.mojo.GatlingMojo.execute (GatlingMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 255 (Exit value: 255)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:402)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:164)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:151)
at io.gatling.mojo.Fork.run (Fork.java:120)
at io.gatling.mojo.GatlingMojo.executeCompiler (GatlingMojo.java:265)
at io.gatling.mojo.GatlingMojo.execute (GatlingMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Are you running with “incremental compilation enabled”, I have read that this can cause the issue you are seeing on other scala 2.12.4 and Java 1.8 projects, where java 9 was installed?

onsdag den 11. april 2018 kl. 20.48.33 UTC+2 skrev plum117:

Caused by: java.lang.NumberFormatException: Not a version: 9

at scala.util.PropertiesTrait.parts$1(Properties.scala:186)
at scala.util.PropertiesTrait.isJavaAtLeast(Properties.scala:189)
at scala.util.PropertiesTrait.isJavaAtLeast$(Properties.scala:183)
at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
at scala.reflect.internal.util.ScalaClassLoader$.(ScalaClassLoader.scala:157)

Properties.scala, line 186

Hi Stéphane,

Thanks for you help, it point me to the right direction.

I was already using gatling-maven-plugin 2.2.4. My problem was appearing when I was adding a dependency on org.scalaj:scalaj-http_2.12:2.3.0. I’m unable to explain it but without this dependency my project compile fine. With it I get “Caused by: java.lang.NumberFormatException: Not a version: 9” which is probably because the wrong version version of the scala library was pull!.

Anyway after forcing the scala-library to version 2.12.4 then now it is compiling just fine!

Thanks again for your help and support!

In case someone has an issue with this one:

Change the Scala version to the older one. In my case switching from 2.12.7 to 2.12.6 fixed the issue.

Sorry, but I sincerely doubt it.
And your advice is wrong:

  1. If you’re indeed using Java 9, you should upgrade to Java 11 as Java 9 is no longer maintained
  2. Upgrade to Gatling 3.0 and gatling-maven-plugin 3.0.1 that support running with Java 11

Regards,

Ive been using the newest released mvn archetype of gatling - 3.0.1

Togather with oracle java version 1.8.0_191 and maven 3.5.4.

Building the generated project produced exactly the error from the title.

Switching to the older version of scala.library solved the issue.

Hope it helps someone save some time searching for solutions.

Cheers,
DH