java.lang.NoSuchMethodError running TestNG Test in Eclipse

MacNord picture MacNord · Jul 24, 2017 · Viewed 19.6k times · Source

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>

Answer

Atul Sharma picture Atul Sharma · Dec 8, 2019

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).