Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class io.gatling.core.action.package$

1,012 views
Skip to first unread message

Jérôme Mars

unread,
Dec 1, 2014, 9:23:27 AM12/1/14
to gat...@googlegroups.com
Hello,


I'm a beginner with gatling and scala.... I trying to make it usable within IntelliJ (13.1.6)
I used the artifact tu get the project build as said (I had several issues to obtain a valid project, but it's done). 

It seems to work well (the recorder worked and saved me a scenario as required).

My problem comes with the engine, it runs fine, asks me to select the desired simultation, the id (leave it as default), and the optionnal run description, then it crashes with this error (I wanted to try the test file provided BasicSimulation.scala before testing a complex one) :


Simulation fr.box.bench.BasicSimulation started...
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class io.gatling.core.action.package$
at io.gatling.core.runner.Runner.run(Runner.scala:77)
at io.gatling.app.Gatling$$anonfun$18.apply(Gatling.scala:188)
at io.gatling.app.Gatling$$anonfun$18.apply(Gatling.scala:180)
at scala.Option.getOrElse(Option.scala:120)
at io.gatling.app.Gatling.start(Gatling.scala:180)
at io.gatling.app.Gatling$.fromMap(Gatling.scala:59)
at Engine$delayedInit$body.apply(Engine.scala:12)
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 Engine$.main(Engine.scala:4)
at Engine.main(Engine.scala)

I assume something is missing, but I really don't know where else to seek... I'm quite desperate so if anyone could help me that would be great.

Thank you.

PS : Here is the pom.xml I use :


<?xml version="1.0" encoding="UTF-8"?>
    <modelVersion>4.0.0</modelVersion>
    <groupId>fr.axigate.bench</groupId>
    <artifactId>nx</artifactId>
    <version>1.0.0</version>

    <repositories>
        <repository>
            <id>sonatype-snapshots</id>
            <name>Sonatype snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>typesafe</id>
            <name>Typesafe Repository</name>
            <url>http://repo.typesafe.com/typesafe/releases/</url>
        </repository>
    </repositories>

    <properties>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <scala.version>2.10.2</scala.version>
        <encoding>UTF-8</encoding>

        <gatling.version>2.0.0-M3a</gatling.version>
        <gatling-highcharts.version>2.0.0-M3a</gatling-highcharts.version>

        <scala-maven-plugin.version>3.1.5</scala-maven-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <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>

            <dependency>
                <groupId>io.gatling.highcharts</groupId>
                <artifactId>gatling-charts-highcharts</artifactId>
                <version>${gatling-highcharts.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>com.typesafe.akka</groupId>
                <artifactId>akka-actor_2.10</artifactId>
                <version>2.3.7</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>io.gatling.highcharts</groupId>
            <artifactId>gatling-charts-highcharts</artifactId>
        </dependency>
        <dependency>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-app</artifactId>
        </dependency>
        <dependency>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-recorder</artifactId>
        </dependency>
        <dependency>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-core</artifactId>
            <version>2.0.0-M3a</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/scala</sourceDirectory>
        <testSourceDirectory>src/test/scala</testSourceDirectory>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala-maven-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Stéphane Landelle

unread,
Dec 1, 2014, 9:29:50 AM12/1/14
to gat...@googlegroups.com
Hi,

What made you want to use 2M3a instead of a modern version (latest release is 2.0.3)?

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jérôme Mars

unread,
Dec 1, 2014, 9:36:01 AM12/1/14
to gat...@googlegroups.com
Nothing especially... To be honnest It's the only config I could get operationnal with maven.
As I said I had many problem to get a project fonctionnal...

Is there any detailed tutorial to set up a project with a 2.0.3 version (for the dumb... considering the difficulties I had to get this one ;) )? 

Thank you.

Stéphane Landelle

unread,
Dec 1, 2014, 9:44:55 AM12/1/14
to gat...@googlegroups.com

Jérôme Mars

unread,
Dec 1, 2014, 11:27:44 AM12/1/14
to gat...@googlegroups.com
finally, It's working, thank you, I had a look to the project before but not as closed as I should have.

Stéphane Landelle

unread,
Dec 1, 2014, 11:28:10 AM12/1/14
to gat...@googlegroups.com
Glad it helped.
Reply all
Reply to author
Forward
0 new messages