Yep, looks like you can't inject SymbolSource into your ApplicationDefaults contribution method when ProdMode is set to true; bit of a pain because I was using it to extract my webapp version for setting as the tapestry.app-version.
I'm not entirely happy with the contribution dependency tree changing when changing such an obvious flag - I'm sure others will run into the same issue, and probably just as they're going live too! Still, as Lenny says, it was bloody funny! Cheers, Steve. On 14 September 2011 21:17, Lenny Primak <lpri...@hope.nyc.ny.us> wrote: > Not for nothing, but this post got me rolling on the floor!!! > > On Sep 14, 2011, at 9:06 AM, Steve Eynon wrote: > >> An addendum, >> >> It seems to be whenever "SymbolConstants.PRODUCTION_MODE" resolves to true. >> >> Hmm, I'd be very surprised if the T5 crew let something this obvious >> slip through the net so I'll double check my configuration and Symbol >> contributions just to make sure... >> >> Still, I love the way it blows up when ProdMode is set to true! The >> irony puts a smile on my face! >> >> Steve. >> >> On 14 September 2011 20:50, Steve Eynon <steve.ey...@alienfactory.co.uk> >> wrote: >>> This is neat, >>> >>> Application startup blows up with a Service Override recursion >>> exception when IOC fails to resolve 'SymbolConstants.PRODUCTION_MODE' >>> for the TapestryModule.productionModeOverrides() method! >>> >>> public static void productionModeOverrides( >>> MappedConfiguration<Class, Object> configuration, >>> @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode) >>> >>> I came across this little gotcha in T5.1 have been using the following >>> method ever since. >>> >>> private static boolean inProductionMode() { >>> // can't inject ProdMode Symbol for if it's not defined... service >>> recursion error! >>> return >>> !"false".equalsIgnoreCase(System.getProperty("tapestry.production-mode", >>> "true")); >>> } >>> >>> That or you need to set a true / false value for the System Property >>> "tapestry.production-mode" in your web / app server. >>> >>> Steve. >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org