Thanks. 

I used
     configuration.addInstance(…, …)

I also had to change the constructor of my overriding service, the injected 
constructor parameter needed an explicit @InjectService("Request") annotation. 
Both changes together and there wasn't an Exception anymore.

Andy


Am 23.09.2013 um 11:20 schrieb Lance Java <lance.j...@googlemail.com>:

> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to