How to resolve this failure to integrate Guice into Dropwizard?

711 Views Asked by At

I tried to introduce Google Guice into my Dropwizard 2.0 project using dropwizard-guicier following this approach https://github.com/HubSpot/dropwizard-guicier but getting an error

java.lang.IncompatibleClassChangeError: 
Class org.glassfish.jersey.message.internal.MessagingBinders$HeaderDelegateProviders does not implement the requested interface org.glassfish.hk2.utilities.Binder

The same error is being thrown for dropwizard-guice https://github.com/HubSpot/dropwizard-guice as well

Does anybody know what could be the root cause and how to fix it?

1

There are 1 best solutions below

0
Pasha On

Looks like both aforementioned libraries are outdated and there's another one dropwizard-guicey https://github.com/xvik/dropwizard-guicey that works in my case