-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I want to use Gruicer for DI in my dropwizard app,
I am on DW version
<dropwizard.version>1.3.7</dropwizard.version>
Added following dw dependency
<dependency>
<groupId>com.hubspot.dropwizard</groupId>
<artifactId>dropwizard-guicier</artifactId>
<version>1.3.5.0</version>
</dependency>
Getting following error while starting the server
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider org.glassfish.jersey.internal.RuntimeDelegateImpl could not be instantiated: java.lang.IllegalStateException: It appears there is no ServiceLocatorGenerator installed.
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
at javax.ws.rs.core.CacheControl.(CacheControl.java:61)
... 9 more
Caused by: java.lang.ClassNotFoundException: Provider org.glassfish.jersey.internal.RuntimeDelegateImpl could not be instantiated: java.lang.IllegalStateException: It appears there is no ServiceLocatorGenerator installed.
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:122)
at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
... 11 more
Caused by: 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.(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:422)
at java.lang.Class.newInstance(Class.java:442)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:118)
... 13 more