java.lang.NoSuchMethodError: io.dropwizard.jersey.setup.JerseyEnvironment.getResourceConfig () Lcom / sun / jersey / api / core / ResourceConfig; - PullRequest
0 голосов
/ 07 ноября 2019

Я пытаюсь получить доступ к устаревшему модулю и написать интеграционные тесты с использованием нулевого фреймворка. В модуле тестирования интеграции я использую 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)
...