On Thu, Sep 16, 2010 at 6:20 AM, Peter Niederwieser <pnied...@gmail.com> wrote: > > What's the status on this? Seems the problem still exists in 5.2. No matter > which log level I choose, I never see stack traces of exceptions thrown from > a module's @Startup method. > > Cheers, > Peter > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Exceptions-during-registry-startup-tp2431019p2842239.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
The startup handling code doesn't log the exception, it wraps and rethrows it in a RuntimeException. I'm not saying that's correct, I'm just stating how its coded. public void startup(ModuleBuilderSource moduleSource, ObjectLocator locator, OperationTracker tracker, Logger logger) { Map<Class, Object> resourceMap = CollectionFactory.newMap(); resourceMap.put(ObjectLocator.class, locator); resourceMap.put(Logger.class, logger); InjectionResources injectionResources = new MapInjectionResources(resourceMap); Throwable fail = null; Object moduleInstance = InternalUtils.isStatic(startupMethod) ? null : moduleSource .getModuleBuilder(); try { Object[] parameters = InternalUtils.calculateParametersForMethod( startupMethod, locator, injectionResources, tracker); startupMethod.invoke(moduleInstance, parameters); } catch (InvocationTargetException ex) { fail = ex.getTargetException(); } catch (Exception ex) { fail = ex; } if (fail != null) throw new RuntimeException( format("Error invoking startup method %s: %s", asString(startupMethod), toMessage(fail)), fail); } Are you sure your @Startup methods are being invoked (i.e., check with debugger). I thought @Startup was broken until Igor pointed out for me that the method has to be public. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org