-1

I'm writing a "Hello-World" application in Vertx2. I have the following dependencies in pom.xml:

<dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-core</artifactId>
            <version>2.1.6</version>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-platform</artifactId>
            <version>2.0.0-beta1</version>
        </dependency>

and run it as IntelliJ application with the following configuration: enter image description here

I get the error:

Exception in thread "main" java.lang.NoSuchMethodError:

org.vertx.java.core.impl.VertxInternal.getOrAssignContext()Lorg/vertx/java/core/impl/DefaultContext;

Do you know what is the problem here?

Edit: This project is for Vertx version 2 (not version 3). This is why the solution in this IntelliJ and Vertx: How to run org.vertx.java.deploy.impl.cli.Starter ? doesn't resolve the issue.

CrazySynthax
  • 13,662
  • 34
  • 99
  • 183

1 Answers1

0

I found a solution to this problem. I just changed the version numbers for vertx-core and vertx-platform, and now it works.

The new dependencies in pom.xml are:

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-core</artifactId>
            <version>2.1RC3</version>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-platform</artifactId>
            <version>2.1.5</version>
        </dependency>
CrazySynthax
  • 13,662
  • 34
  • 99
  • 183