Your ClassCastException is caused by using configuration.add(…, …) instead
of configuration.addInstance(…, …)

If you find that contribution to ServiceOverride fails causes circular
dependency you can decorate instead of override:

static BaseURLSource decorateBaseURLSource(BaseUrlSource default,
@Autobuild MyBaseURLSource override) {
   return override;
}

Another option is to @Inject RequestGlobals instead of Request and call
getRequest(). This might eliminate the circular dependency too.

Reply via email to