有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

JAVAlang.NoSuchMethodError:io。dropwizard。运动衫设置。运动衫环境。getResourceConfig()Lcom/sun/jersey/api/core/ResourceConfig;

我试图访问一个遗留模块,并使用零代码框架编写集成测试。在集成测试模块中,我使用的是dropwizard-1.13.2版本,原始模块是0.7.1版本。使用DropwizardAppRule时,我得到以下错误:

java.lang.NoSuchMethodError: io.dropwizard.jersey.setup.JerseyEnvironment.getResourceConfig()Lcom/sun/jersey/api/core/ResourceConfig;

    at com.xyz.hubsystem.bootstrap.ResourceConfig.bindResources(ResourceConfig.java:108)
    at com.xyz.hubsystem.HubSystemApplication.run(HubSystemApplication.java:114)
    at com.xyz.hubsystem.HubSystemApplication.run(HubSystemApplication.java:57)
    at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43)
    at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
    at io.dropwizard.testing.DropwizardTestSupport.startIfRequired(DropwizardTestSupport.java:237)
    at io.dropwizard.testing.DropwizardTestSupport.before(DropwizardTestSupport.java:151)
    at io.dropwizard.testing.junit.DropwizardAppRule.before(DropwizardAppRule.java:159)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

共 (0) 个答案