This issue is not seen with Java 8 + Gatling 0.7.0 (plugin from https://mvnrepository.com/artifact/gradle.plugin.com.github.lkishalmi.gatling/gradle-gatling-plugin/0.7.0).
I’m using the Gradle Gatling plugin from https://mvnrepository.com/artifact/gradle.plugin.com.github.lkishalmi.gatling/gradle-gatling-plugin/3.0.2
Java installation details:
openjdk version “11.0.3” 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.14.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20190418_204 (JIT enabled, AOT enabled)
OpenJ9 - bad1d4d06
OMR - 4a4278e6
JCL - 5cc996a803 based on jdk-11.0.3+7)
Here’s the full error trace:
Reported exception:
ch.qos.logback.core.joran.spi.JoranException: Problem parsing XML document. See previously reported errors.
at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:65)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:151)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at com.typesafe.scalalogging.StrictLogging.$init$(Logging.scala:39)
at io.gatling.app.Gatling$.(Gatling.scala:36)
at io.gatling.app.Gatling$.(Gatling.scala)
at io.gatling.app.Gatling.main(Gatling.scala)
Caused by: org.xml.sax.SAXParseException; systemId: file:/Users/akshaymaldhure/projects/abc/tests/abc-performance-tests/build/resources/gatling/logback.xml; lineNumber: 2; columnNumber: 2; The markup in the document following the root element must be well-formed.
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1243)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:59)
… 15 more
13:03:36,249 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
13:03:36,251 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
13:03:36,265 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/akshaymaldhure/projects/abc/tests/abc-performance-tests/build/resources/gatling/logback.xml
13:03:36,460 |-ERROR in ch.qos.logback.core.joran.event.SaxEventRecorder@1cd2d754 - XML_PARSING - Parsing fatal error on line 2 and column 2
13:03:36,460 |-ERROR in ch.qos.logback.core.joran.event.SaxEventRecorder@1cd2d754 - org.xml.sax.SAXParseException; systemId: file:/Users/akshaymaldhure/projects/abc/tests/abc-performance-tests/build/resources/gatling/logback.xml; lineNumber: 2; columnNumber: 2; The markup in the document following the root element must be well-formed.
Exception in thread “main” java.lang.IllegalArgumentException: User defined Simulation class com.abc.MySimulationsClass could not be loaded
at io.gatling.app.Selection$Selector.findUserDefinedSimulationInClassloader$1(Selection.scala:79)
at io.gatling.app.Selection$Selector.$anonfun$singleSimulationFromConfig$4(Selection.scala:84)
at io.gatling.app.Selection$Selector$$Lambda$298.00000000171B1A20.apply(Unknown Source)
at scala.Option.orElse(Option.scala:289)
at io.gatling.app.Selection$Selector.$anonfun$singleSimulationFromConfig$3(Selection.scala:84)
at io.gatling.app.Selection$Selector$$Lambda$296.0000000018B01C20.apply(Unknown Source)
at scala.Option.flatMap(Option.scala:171)
at io.gatling.app.Selection$Selector.singleSimulationFromConfig(Selection.scala:82)
at io.gatling.app.Selection$Selector.$anonfun$selection$1(Selection.scala:52)
at io.gatling.app.Selection$Selector$$Lambda$285.000000001718D820.apply(Unknown Source)
at scala.Option.getOrElse(Option.scala:121)
at io.gatling.app.Selection$Selector.selection(Selection.scala:44)
at io.gatling.app.Selection$.apply(Selection.scala:36)
at io.gatling.app.Runner.run0(Runner.scala:74)
at io.gatling.app.Runner.run(Runner.scala:61)
at io.gatling.app.Gatling$.start(Gatling.scala:74)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:47)
at io.gatling.app.Gatling$.main(Gatling.scala:39)
at io.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.lang.ClassNotFoundException: com.abc.MySimulationsClass
at java.base/java.lang.Class.forNameImpl(Native Method)
at java.base/java.lang.Class.forName(Class.java:340)
at io.gatling.app.Selection$Selector.$anonfun$singleSimulationFromConfig$2(Selection.scala:70)
at io.gatling.app.Selection$Selector$$Lambda$299.00000000179F2E20.apply(Unknown Source)
at scala.util.Try$.apply(Try.scala:209)
at io.gatling.app.Selection$Selector.findUserDefinedSimulationInClassloader$1(Selection.scala:70)
… 18 more