I am trying to override the MarkupWriterFactory in tapestry 5.1 I tried using the the new service override contribution
public static void contributeServiceOverride(MappedConfiguration<Class, Object> configuration, @Local XhtmlMarkupWriterFactory xhtmlMarkupWriterFactory) { configuration.add(MarkupWriterFactory.class, xhtmlMarkupWriterFactory); } but I get Caused by: org.apache.tapestry5.ioc.internal.OperationException: Construction of service 'ServiceOverride' has failed due to recursion: the service depends on itself in some way. Please check org.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl(Map) (at ServiceOverrideImpl.java:29) via org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:43) for references to another service that is itself dependent on service 'ServiceOverride'. at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:90) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68) ... 155 more Caused by: java.lang.IllegalStateException: Construction of service 'ServiceOverride' has failed due to recursion: the service depends on itself in some way. Please check org.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl(Map) (at ServiceOverrideImpl.java:29) via org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:43) for references to another service that is itself dependent on service 'ServiceOverride'. at org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:52) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68) ... 159 more [INFO] mortbay.log Started selectchannelconnec...@0.0.0.0:8080 Has anyone got an idea of what I could do to get past this? I have tried aliasing the service as well and get a similar error. Ben Gidley www.gidley.co.uk b...@gidley.co.uk