在Eclipse中运行TestNG测试的java.lang.NoSuchMethodError [英] java.lang.NoSuchMethodError running TestNG Test in Eclipse

查看:90
本文介绍了在Eclipse中运行TestNG测试的java.lang.NoSuchMethodError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在获得例外

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)

使用TestNG和wildfly11在Eclipse氧气中运行Arquillian测试. 我的Maven配置如下:

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>

推荐答案

解决方案是:

删除Wildfly 11运行时 来自类路径.

remove the the Wildfly 11 Runtime from the Classpath.

  1. 右键单击项目
  2. 构建路径
  3. 配置构建路径
  4. 图书馆(Tab)
  5. 删除Wildfly 11运行时(或Wildfly 10 Runtime)

为什么这是必要的?欢迎评论...

Why is this necessary? Comments welcome...

这篇关于在Eclipse中运行TestNG测试的java.lang.NoSuchMethodError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆