MacNord
MacNord

Reputation: 141

java.lang.NoSuchMethodError running TestNG Test in Eclipse

I am getting the Exception

FAILED CONFIGURATION: @BeforeSuite arquillianBeforeSuite 
java.lang.NoSuchMethodError: org.jboss.remoting3.Endpoint.builder()Lorg/jboss/remoting3/EndpointBuilder;
at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:117)
at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:59)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:147)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:122)

Running Arquillian Tests in Eclipse Oxygen with TestNG and wildfly11. My Maven configuration is as follows:

    <dependency>
        <groupId>org.jboss.arquillian.testng</groupId>
        <artifactId>arquillian-testng-container</artifactId>
        <version>1.1.13.Final</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.11</version>
    </dependency>
    <dependency>
        <groupId>org.wildfly.arquillian</groupId>
        <artifactId>wildfly-arquillian-container-managed</artifactId>
        <version>2.0.1.Final</version>
        <scope>test</scope>
    </dependency>

Upvotes: 2

Views: 41656

Answers (8)

Anurag Chaturvedi
Anurag Chaturvedi

Reputation: 1

It can be resolve in 2 ways:

  1. either you add the TestNG library from build path OR
  2. You change the testNG dependency from your pom.xml to 7.7.1 and It will start working.
<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>7.7.1</version>
    <scope>test</scope>
</dependency>

Upvotes: 0

vipin devops
vipin devops

Reputation: 1

Go to eclipse and check the testng version in installed section, just copy the same version in pom.xml or upgrade the version of testng in eclipse

Upvotes: 0

Vikul Bora
Vikul Bora

Reputation: 41

I also faced a similar issue when I added TestNg dependency version 7.8.0 in pom.xml.
I changed the dependency to 7.7.1 and it started working.

<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>7.7.1</version>
    <scope>test</scope>
</dependency>

Upvotes: 4

Gaurav Jollly
Gaurav Jollly

Reputation: 73

if you are working on a maven project, upgrade your testng version to 7.1.0 and its scope to test.

    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.1.0</version>
        <scope>test</scope>
    </dependency>

Upvotes: 0

VFXG
VFXG

Reputation: 11

adding testng library to the project worked for me!

Upvotes: 0

k sarath
k sarath

Reputation: 799

Even I have faced the same issue when I was about to use the latest version of TestNG, but downgrading to a lower version of TestNG resolved the problem.

Upvotes: 5

Atul Sharma
Atul Sharma

Reputation: 161

I also had the same issue. I tried the below solution and it worked for me like a charm. The Solution was:

Adding the TestNG Library into the project. Steps are:

  1. Right Click on the Project
  2. Build Path
  3. Configure Build Path
  4. Libraries (Tab)
  5. Go to "Add Library" and click the button.
  6. Add the 'TestNG' Library and click Ok/Next.
  7. TestNG Library will be added to your project.

Try Running again, it will work.

Note: I was using Java1.8 Library (had to update it from java1.5 as my eclipse create the project with default 1.5).

Upvotes: 16

MacNord
MacNord

Reputation: 141

The Solution was:

remove the the Wildfly 11 Runtime from the Classpath.

  1. Right Click on the Project
  2. Build Path
  3. Configure Build Path
  4. Libraries (Tab)
  5. remove Wildfly 11 Runtime (or Wildfly 10 Runtime)

Why is this necessary? Comments welcome...

Upvotes: 3

Related Questions