# Getting java.lang.ClassNotFoundException with "./gradlew gatlingRun-com.abc.MySimulationsClass" with Gatling 3 and Java 11

**URL:** https://community.gatling.io/t/getting-java-lang-classnotfoundexception-with-gradlew-gatlingrun-com-abc-mysimulationsclass-with-gatling-3-and-java-11/5153
**Category:** Gatling (Open-Source)
**Created:** [July 25, 2019, 8:14am UTC](https://community.gatling.io/t/getting-java-lang-classnotfoundexception-with-gradlew-gatlingrun-com-abc-mysimulationsclass-with-gatling-3-and-java-11/5153 "2019-07-25T08:14:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Akshay\_Maldhure](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Akshay\_Maldhure](https://community.gatling.io/u/Akshay_Maldhure)
#### Post date: [July 25, 2019, 8:14am UTC](https://community.gatling.io/t/getting-java-lang-classnotfoundexception-with-gradlew-gatlingrun-com-abc-mysimulationsclass-with-gatling-3-and-java-11/5153/1 "2019-07-25T08:14:52Z")

</div>

**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](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](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)

[https://mvnrepository.com/artifact/gradle.plugin.com.github.lkishalmi.gatling/gradle-gatling-plugin/3.0.2](https://mvnrepository.com/artifact/gradle.plugin.com.github.lkishalmi.gatling/gradle-gatling-plugin/3.0.2)

**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

---

<div class="post-metadata">

### Author: ![Evgeny\_Shepelyuk](https://avatars.discourse-cdn.com/v4/letter/e/eada6e/32.png) [@Evgeny\_Shepelyuk](https://community.gatling.io/u/Evgeny_Shepelyuk)
#### Post date: [September 6, 2019, 6:13pm UTC](https://community.gatling.io/t/getting-java-lang-classnotfoundexception-with-gradlew-gatlingrun-com-abc-mysimulationsclass-with-gatling-3-and-java-11/5153/2 "2019-09-06T18:13:45Z")

</div>

Hello

Not sure why do you report a bug here instead contacting us (plugin devs) at [https://github.com/lkishalmi/gradle-gatling-plugin/issues](https://github.com/lkishalmi/gradle-gatling-plugin/issues)

четвер, 25 липня 2019 р. 11:20:43 UTC+3 користувач Akshay Maldhure написав:
