Giter Club home page Giter Club logo

Comments (5)

carltonwhitehead avatar carltonwhitehead commented on August 15, 2024

I forked this repo, dropwizard-junit, and dropwizard-swagger-sample-app and updated each of them to use the current development snapshot of dropwizard-0.8. There were a few bumps along the way, but I got the basic cases demonstrated in the sample app working. However, in order to build a dropwizard-swagger artifact, I had to make an adjustment to the test that probably should not be accepted in a pull request. Also, the selenium tests are still failing. See carltonwhitehead@d8cac4e

from dropwizard-swagger.

eric239 avatar eric239 commented on August 15, 2024

Hi @carltonwhitehead
Is there a way to work around the above exception trace? My project depends on dw 0.8 but I hoped to take advantage of swagger "auto-magically", sad to realize the magic is broken...

from dropwizard-swagger.

jogura-zz avatar jogura-zz commented on August 15, 2024

I ran into the same issue. You can get around this by including the dependency on the latest version of dropwizard-views-freemarker

For example, if you're using gradle you can modify the build.gradle file and include as a dependency:

compile "io.dropwizard:dropwizard-views-freemarker:[your version of dw - 0.8.0X]"

from dropwizard-swagger.

alph486 avatar alph486 commented on August 15, 2024

Is just including new latest freemarker enough, though? The original problem above has to do with classes declared in the dropwizard-views package. You'd need the latest of that to fix the problem, and when you get that imported you get this issue:

Exception in thread "main" java.lang.InstantiationError: io.dropwizard.views.ViewBundle
    at io.federecio.dropwizard.swagger.SwaggerDropwizard.onInitialize(SwaggerDropwizard.java:47)
    at com.actian.dataflood.service.DFApplication.initialize(DFApplication.java:51)
    at io.dropwizard.Application.run(Application.java:71)
    at com.actian.dataflood.service.DFApplication.main(DFApplication.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

because of the ViewBundle being abstract. If the ViewBundle were in a separate package you might be able to do dependency magic, but you need the latest views dependency. Fixes appear to be required to use this with 0.8.0.

On that note, mins ago on #37 @vultron81 submitted a pull request for this...

from dropwizard-swagger.

federecio avatar federecio commented on August 15, 2024

Dropwizard 0.8 is now supported in version 0.6 which has just been deployed to Maven Central and the README has been updated accordingly (@vultron81 and @thiagomoretto both submitted pull requests).

from dropwizard-swagger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.