Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while Running dropwizard-swagger #94

Open
ashishrathore1 opened this issue Sep 18, 2016 · 1 comment
Open

Error while Running dropwizard-swagger #94

ashishrathore1 opened this issue Sep 18, 2016 · 1 comment

Comments

@ashishrathore1
Copy link

I am using dropwizard-swagger version 0.7.0 with dropwizard 0.8.2 but while running i am getting following error. I am using java 1.8 plugin . Please help me or provide another alternate to use

Exception in thread "main" java.lang.NoSuchMethodError: org.reflections.util.ClasspathHelper.forPackage(Ljava/lang/String;[Ljava/lang/ClassLoader;)Ljava/util/Collection;
at com.wordnik.swagger.jaxrs.config.BeanConfig.classes(BeanConfig.java:168)
at com.wordnik.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:146)
at io.federecio.dropwizard.swagger.SwaggerBundle.setUpSwagger(SwaggerBundle.java:109)
at io.federecio.dropwizard.swagger.SwaggerBundle.run(SwaggerBundle.java:62)
at io.federecio.dropwizard.swagger.SwaggerBundle.run(SwaggerBundle.java:37)
at io.dropwizard.setup.Bootstrap.run(Bootstrap.java:183)
at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:73)
at com.lk.leadservice.DropdemowithhibernateApplication.main(DropdemowithhibernateApplication.java:58)

@ghost
Copy link

ghost commented Dec 18, 2017

For dropwizard-swagger-1.2.2-1 tthis seems to be a bug in the reflections-0.9.11 JAR which swagger depends on.

Use this in your pom.xml:

<dependency>
  <groupId>com.smoketurner</groupId>
    <artifactId>dropwizard-swagger</artifactId>
    <version>1.1.2-1</version>
    <exclusions>
      <exclusion>
        <groupId>org.reflections</groupId>
        <artifactId>reflections</artifactId>
      </exclusion>
    </exclusions>
  </dependency>
  <dependency>
    <groupId>org.reflections</groupId>
    <artifactId>reflections</artifactId>
    <version>0.9.10</version>
  </dependency>

reftel pushed a commit to reftel/dropwizard-swagger that referenced this issue Jan 29, 2018
fix(oauth2): redirect url was not absolute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant