You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Juan Camilo Marín <jm...@gmail.com> on 2009/12/18 23:45:19 UTC

How to contribute an ApplicationInitializer to load Spring Context

Greetings

I'm working with Tapestry 5.1 and the IoC of Spring 2.5.6.

I'm using the tapx-tapestry library to make a offline-template render for my
application, if I use the IoC of Tapestry the TemplateAPI (
com.howardlewisship.tapx.templating.TemplateAPI)
launch the ApplicationContext perfectly but when I use the IoC of Spring the
logs show me this error when the TemplateAPI try to load the
ApplicationContext.

java.lang.RuntimeException: Error invoking service builder method
org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger,
List) (at TapestryModule.java:1204) (for service 'ApplicationInitializer'):
Error invoking service contribution method
org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration,
ApplicationContext): No service implements the interface
org.springframework.context.ApplicationContext.

I don't know how to write an ApplicationContext implementacion class for
contribute it to the TapestryModule, to load a Spring Context.

If somebody can address me how to do it or where I can find some examples,
I'll be gratefully,

Thanks.

-- 
Life may only be understood backwards.... but it must be lived forwards

Re: How to contribute an ApplicationInitializer to load Spring Context

Posted by Alex Kotchnev <ak...@gmail.com>.
Juan,
   sounds like you might be missing an applicationContext.xml file in your
app  - Spring uses that to create the application context that it says it's
not finding. Even if you provide an empty file, Spring will create an empty
context and you don't have to create anything manually. .

Regards,

Alex K

2009/12/18 Juan Camilo Marín <jm...@gmail.com>

> Greetings
>
> I'm working with Tapestry 5.1 and the IoC of Spring 2.5.6.
>
> I'm using the tapx-tapestry library to make a offline-template render for
> my
> application, if I use the IoC of Tapestry the TemplateAPI (
> com.howardlewisship.tapx.templating.TemplateAPI)
> launch the ApplicationContext perfectly but when I use the IoC of Spring
> the
> logs show me this error when the TemplateAPI try to load the
> ApplicationContext.
>
> java.lang.RuntimeException: Error invoking service builder method
>
> org.apache.tapestry5.services.TapestryModule.buildApplicationInitializer(Logger,
> List) (at TapestryModule.java:1204) (for service 'ApplicationInitializer'):
> Error invoking service contribution method
>
> org.apache.tapestry5.spring.SpringModule.contributeApplicationInitializer(OrderedConfiguration,
> ApplicationContext): No service implements the interface
> org.springframework.context.ApplicationContext.
>
> I don't know how to write an ApplicationContext implementacion class for
> contribute it to the TapestryModule, to load a Spring Context.
>
> If somebody can address me how to do it or where I can find some examples,
> I'll be gratefully,
>
> Thanks.
>
> --
> Life may only be understood backwards.... but it must be lived forwards
>