[main][ERROR][ZincCompiler.scala:183] i.g.c.ZincCompiler$

Hi,

I am a beginner in Gatling
For “mvn clean” the build was successful
But I getting this error when executing “mvn gatling:test”.

 [main][ERROR][ZincCompiler.scala:183] i.g.c.ZincCompiler$ - 
  bad constant pool index: 0 at pos: 48461
     while compiling: <no file>
        during phase: globalPhase=<no phase>, enteringPhase=<some phase>
     library version: version 2.13.6
    compiler version: version 2.13.6
  reconstructed args: -

[main][ERROR][ZincCompiler.scala:142] i.g.c.ZincCompiler$ - ## Exception when compiling 5 sources to C:\Users\---------------

 [main][ERROR][ZincCompiler.scala:268] i.g.c.ZincCompiler$ - Compilation crashed
scala.reflect.internal.FatalError:
  bad constant pool index: 0 at pos: 48461
     while compiling: <no file>
        during phase: globalPhase=<no phase>, enteringPhase=<some phase>
     library version: version 2.13.6
    compiler version: version 2.13.6

*************pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.energysage.perf</groupId>
  <artifactId>gatlingperf</artifactId>
  <version>1.0-SNAPSHOT</version>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <encoding>UTF-8</encoding>
    <maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <gatling.version>3.6.1</gatling.version>
    <gatling-maven-plugin.version>3.1.2</gatling-maven-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.gatling.highcharts</groupId>
      <artifactId>gatling-charts-highcharts</artifactId>
      <version>${gatling.version}</version>
    </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>

    <!-- https://mvnrepository.com/artifact/io.gatling/gatling-maven-plugin -->
    <dependency>
      <groupId>io.gatling</groupId>
      <artifactId>gatling-maven-plugin</artifactId>
      <version>${gatling-maven-plugin.version}</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.12.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>3.3.1</version>
    </dependency>

  </dependencies>

  <build>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>io.gatling</groupId>
        <artifactId>gatling-maven-plugin</artifactId>
        <version>${gatling-maven-plugin.version}</version>
      </plugin>
    </plugins>
  </build>
</project>

Thanks in advance for your kind support.

Regards
Purush

Way too old set up, in particular the gatling (latest 3.10.3) and gatling-maven-plugin version (latest 4.8.0).
We can only help if you upgrade to latest versions.
Please check the demo project for maven+scala: GitHub - gatling/gatling-maven-plugin-demo-scala: Showcase of the Gatling Plugin for Maven + Scala

Thanks for your reply.
I donwloaded the project from github.

here is my pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>io.gatling.demo</groupId>
  <artifactId>gatling-maven-plugin-demo-scala</artifactId>
  <version>3.10.3</version>

  <properties>
    <maven.compiler.release>11</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <gatling.version>${project.version}</gatling.version>
    <gatling-maven-plugin.version>4.8.0</gatling-maven-plugin.version>
    <maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
    <scala-maven-plugin.version>4.8.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>
  </dependencies>

  <build>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${maven-resources-plugin.version}</version>
      </plugin>
      <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>
            <configuration>
              <jvmArgs>
                <jvmArg>-Xss100M</jvmArg>
              </jvmArgs>
              <args>
                <arg>-deprecation</arg>
                <arg>-feature</arg>
                <arg>-unchecked</arg>
                <arg>-language:implicitConversions</arg>
                <arg>-language:postfixOps</arg>
              </args>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.gatling</groupId>
        <artifactId>gatling-maven-plugin</artifactId>
        <version>${gatling-maven-plugin.version}</version>
        <configuration>
          <!-- Enterprise Cloud (https://cloud.gatling.io/) configuration reference: https://gatling.io/docs/gatling/reference/current/extensions/maven_plugin/#working-with-gatling-enterprise-cloud -->
          <!-- Enterprise Self-Hosted configuration reference: https://gatling.io/docs/gatling/reference/current/extensions/maven_plugin/#working-with-gatling-enterprise-self-hosted -->
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

And in the pom.xml i have error on these plugin

   <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${maven-resources-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
      </plugin>
      <plugin>

Build error is

] Failed to execute goal io.gatling:gatling-maven-plugin:4.8.0:test (default-cli) on project gatling-maven-plugin-demo-scala:
Execution default-cli of goal io.gatling:gatling-maven-plugin:4.8.0:test failed:
A required class was missing while executing io.gatling:gatling-maven-plugin:4.8.0:test: org/codehaus/plexus/util/DirectoryScanner

Thank you for help

:man_facepalming: That’s a recent regression. I’ve just fixed it, please upgrade to gatling-maven-plugin 4.8.1 (the demo project has been updated as well).

It worked and that was great. Thanks for your help. This is will help me to explore more.