mvn gatling:test 抛出 java.lang.StackOverflowError 错误
mvn gatling:test throws java.lang.StackOverflowError error
我刚刚将 Gatling 从 3.3 升级到 3.7.6 版。现在,当我尝试执行 mvn gatling:test
或 ./mvnw clean gatling:test -Dgatling.simulationClass==ai.slit.brb.gatling.simulations.ActSimulation
时,出现 Whosebug 错误。
我已经尝试了大多数在线解决方案,但 none 似乎对我有用。我可能缺少什么?
下面是我的 pom.xml 文件:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gatling.version>3.7.6</gatling.version>
<gatling-maven-plugin.version>4.1.5</gatling-maven-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<scala-maven-plugin.version>4.6.1</scala-maven-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-app</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-recorder</artifactId>
<version>${gatling.version}</version>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmArgs>
<jvmArg>-Xms1g</jvmArg>
<jvmArg>-Xmx4g</jvmArg>
<jvmArg>-XX:MaxPermSize=1024m</jvmArg>
</jvmArgs>
<args>
<arg>-target:jvm-1.8</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
</configuration>
</plugin>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-maven-plugin.version}</version>
<configuration>
<runMultipleSimulations>true</runMultipleSimulations>
<simulationsFolder>src/test/scala/ai/slit/brb/gatling/simulations</simulationsFolder>
</configuration>
</plugin>
</plugins>
</build>
</project>
我已经尝试增加内存大小,所有其他建议,但 none 似乎对我有用。
Gatling's documentation 建议检查演示项目。
请检查 maven + Scala 的那个。
You're missing the -Xss
parameter.
我刚刚将 Gatling 从 3.3 升级到 3.7.6 版。现在,当我尝试执行 mvn gatling:test
或 ./mvnw clean gatling:test -Dgatling.simulationClass==ai.slit.brb.gatling.simulations.ActSimulation
时,出现 Whosebug 错误。
我已经尝试了大多数在线解决方案,但 none 似乎对我有用。我可能缺少什么?
下面是我的 pom.xml 文件:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gatling.version>3.7.6</gatling.version>
<gatling-maven-plugin.version>4.1.5</gatling-maven-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<scala-maven-plugin.version>4.6.1</scala-maven-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-app</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-recorder</artifactId>
<version>${gatling.version}</version>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmArgs>
<jvmArg>-Xms1g</jvmArg>
<jvmArg>-Xmx4g</jvmArg>
<jvmArg>-XX:MaxPermSize=1024m</jvmArg>
</jvmArgs>
<args>
<arg>-target:jvm-1.8</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
</configuration>
</plugin>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-maven-plugin.version}</version>
<configuration>
<runMultipleSimulations>true</runMultipleSimulations>
<simulationsFolder>src/test/scala/ai/slit/brb/gatling/simulations</simulationsFolder>
</configuration>
</plugin>
</plugins>
</build>
</project>
我已经尝试增加内存大小,所有其他建议,但 none 似乎对我有用。
Gatling's documentation 建议检查演示项目。
请检查 maven + Scala 的那个。
You're missing the -Xss
parameter.