As a workaround you could inject the symbol into the module constructor and then use it in the contributeAlias method.
On Wed, Nov 26, 2008 at 5:44 PM, Joel Halbert <[EMAIL PROTECTED]> wrote: > damn, my last email was sent before i'd finished... > > . > . > > For the time being I'm going to solve the problem by hardwiring the > charset > > public static void contributeAlias( > Configuration<AliasContribution<MarkupWriterFactory>> > configuration > ) { > > configuration.add(AliasContribution.create(MarkupWriterFactory.class, > new XhtmlMarkupWriterFactoryImpl("UTF-8"))); > > } > > > I should not imaging that injecting services into the alias contribution > is something that will be required much anyway.... > > > On Wed, 2008-11-26 at 17:42 +0000, Joel Halbert wrote: > > For the time being I'm going to solve the problem by simply hardiwing > > the charset > > > > > > On Wed, 2008-11-26 at 17:35 +0000, Joel Halbert wrote: > > > the problem appears to be related to another conitribution method: > > > > > > public void contributeApplicationDefaults( > > > MappedConfiguration<String, String> configuration, > > > @Inject > > > ApplicationGlobals applicationGlobals, > > > @Inject > > > SymbolSource symbolSource > > > ) { > > > . > > > . > > > > > > when this is commented out it no longer throws the error, I guess the > > > double dependency on SymbolSource is causing the problem...? > > > > > > > > > > > > On Wed, 2008-11-26 at 09:06 -0800, Howard Lewis Ship wrote: > > > > 5.0.16 introduces much improved logging to the console when this > > > > happens, it should help you diagnost what happened. What I see looks > > > > correct, but there may be something else going on that we can't see. > > > > > > > > On Wed, Nov 26, 2008 at 8:58 AM, Joel Halbert <[EMAIL PROTECTED]> > wrote: > > > > > Hi, > > > > > > > > > > I get the following: > > > > > > > > > > "Caused by: java.lang.IllegalStateException: Construction of > service > > > > > 'Alias' has failed due to recursion: the service depends on itself > in > > > > > some way. Please check > > > > > org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, > String, > > > > > AliasManager, Collection) (at TapestryModule.java:217) for > references to > > > > > another service that is itself dependent on service 'Alias'." > > > > > > > > > > When contributing the following alias: > > > > > > > > > > public static void contributeAlias( > > > > > Configuration<AliasContribution<MarkupWriterFactory>> > > > > > configuration, > > > > > @Inject @Symbol(SymbolConstants.CHARSET) final String > > > > > applicationCharset) { > > > > > > > > > > > > > > > > configuration.add(AliasContribution.create(MarkupWriterFactory.class, > > > > > new > > > > > XhtmlMarkupWriterFactoryImpl(applicationCharset))); > > > > > } > > > > > > > > > > > > > > > as per http://wiki.apache.org/tapestry/Tapestry5HowToXhtml > > > > > > > > > > > > > > > I've seen the other threads on this issue but they haven't helped. > > > > > > > > > > Any ideas? > > > > > > > > > > THanks, > > > > > Joel > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > SU3 Analytics Ltd > The Print House > 18 Ashwin Street > E8 3DL > London > > Tel: +44 (0) 20 3051 8637 > Fax: +44 (0) 20 8196 2215 > Mob: +44 (0) 79 7431 0685 > www.su3analytics.com > > SU3 Analytics Ltd is a company registered in England and Wales under > company number 06639473 at registered address 61b Oxford Gardens, London > W10 5UJ, United Kingdom. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >