I've managed to get a little further with this by defining a service builder method for ApplicationContext in:
com.howardlewisship.tapx.templating.services.TemplateModule like this: public static ApplicationContext build() { TapestryApplicationContext tac = new TapestryApplicationContext(); tac.refresh(); return tac; } which fixes the original exception in my previous email, but introduces a new set of exceptions, as I'm obviously not correctly wiring up the TapestryApplicationContext service. Caused by: java.lang.NullPointerException at org.apache.tapestry5.spring.TapestryApplicationContext.createBeanFactory(TapestryApplicationContext.java:34) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:121) Any idea how to wire up TapestryApplicationContext properly? Also - why is it trying to initialise a Spring ApplicationContext service? Surely the tapx examples just use Tap IOC, where did the dependency on Spring's ApplicationContext come from? J On Tue, 2011-01-04 at 14:15 +0000, Joel Halbert wrote: > Hi & Happy New Year, > > I'm trying to replicate the following example, to generate an HTML email > using the tapestry tapx Template extension. > > https://github.com/hlship/tapx/blob/master/tapx-templating/src/test/java/com/howardlewisship/tapx/templating/integration/SendMail.java > > When I run the example I get the following error: > > > Caused by: java.lang.RuntimeException: No service implements the interface > org.springframework.context.ApplicationContext. > at > org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:560) > at > org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:44) > > > All the tapestry-* jars, including tapestry-spring-5.1.05.jar are in my > classpath. Any clues as to what I'm missing? > > Thanks, > Joel > > > --------------------------------------------------------------------- > 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