Compatiblity with Dropwizard 1.0?
See original GitHub issueI’m trying to upgrade to Dropwizard 1.0 and I’m getting a failure running a unit test (haven’t tried production yet since I’m fixing the tests first).
I filed it in the Dropwizard product and the fellow there says it looks like an incompatibility in libraries with the Guice module used by dropwizard-guice. Specifically he says “This looks like an incompatibility between HK2 (used by Jersey) and Google Guice which shows by including the dropwizard-guice module.”
Is dropwizard-guice supposed to work with Dropwizard 1.0 or is that still in the works?
Here’s the exception trace I get:
java.lang.IllegalStateException: It appears there is no ServiceLocatorGenerator installed.
at com.squarespace.jersey2.guice.GuiceServiceLocatorGeneratorStub.create(GuiceServiceLocatorGeneratorStub.java:50)
at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.internalCreate(ServiceLocatorFactoryImpl.java:312)
at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.create(ServiceLocatorFactoryImpl.java:293)
at org.glassfish.jersey.internal.inject.Injections._createLocator(Injections.java:138)
at org.glassfish.jersey.internal.inject.Injections.createLocator(Injections.java:109)
at org.glassfish.jersey.internal.RuntimeDelegateImpl.<init>(RuntimeDelegateImpl.java:63)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:118)
Issue Analytics
- State:
- Created 7 years ago
- Comments:27 (9 by maintainers)
Top Results From Across the Web
Release Notes — Dropwizard
Gzipped content encoded requests and responses are compatible with Servlet 3.1 and Async IO (#2566). Retired use of deprecated Apache StrSubstitutor and ...
Read more >Releases · dropwizard/dropwizard - GitHub
A damn simple library for building production-ready RESTful web services. - Releases · dropwizard/dropwizard.
Read more >Version history - Dropwizard-guicey - GitHub Pages
Update dropwizard to 2.1.1 (fixes java 8 issue by allowing afterburner usage); Fix classpath scan ... Update to dropwizard 1.0.5 and fix compatibility...
Read more >Getting Started - Dropwizard
If you have any questions about how Maven works, Maven: The Complete Reference should have ... [INFO] Including javax.validation:validation-api:jar:1.0.0.
Read more >Hibernate vs. JPA (hibernate-5.x deprecation warnings after ...
So far I've only published releases compatible with Dropwizard 0.9.0 - 0.9.3. I'd like to get some feedback on the project before releasing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ll be following up with jersey2-guice maintainers to see if we can get this fixed on their end. In the meantime you should be able to work around this by adding something like this to your tests:
+1 to find a solution to this issue.