You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Rendy Tapestry <re...@gmail.com> on 2011/06/27 13:35:47 UTC

Tapestry 5.25 & Spring Integration

Hi,

I was follow the instruction here
http://tapestry.apache.org/integrating-with-spring-framework.html
to integrate spring with tapestry.

I have one special class that implement Spring's ApplicationContextAware.
But when application starting it never invoke
setApplicationContext(ApplicationContext ctx) method. So when my application
requiring the class to find specified bean, the program throw null pointer
exception.

It is not the bean that doesn't exist but the applicationContext itself that
never been initialized.

Please help. Thank you.

Rendy

ps. In my case I used default value for
tapestry.use-external-spring-context.

Re: Tapestry 5.25 & Spring Integration

Posted by Rendy Tapestry <re...@gmail.com>.
Chris,

Thank you for your following response. My class defined through spring
applicationContext, and accidentally when doing refactoring of this
applicationContext, some configuration in web.xml also affected. After
fixing this config, everything just fine now.


On Wed, Jun 29, 2011 at 1:46 AM, Christian Köberl <
tapestry.christian.koeberl@gmail.com> wrote:

> On 2011-06-27 13:35, Rendy Tapestry wrote:
>
>> I was follow the instruction here
>> http://tapestry.apache.org/**integrating-with-spring-**framework.html<http://tapestry.apache.org/integrating-with-spring-framework.html>
>> to integrate spring with tapestry.
>>
>> I have one special class that implement Spring's ApplicationContextAware.
>> But when application starting it never invoke
>> setApplicationContext(**ApplicationContext ctx) method. So when my
>> application
>> requiring the class to find specified bean, the program throw null pointer
>> exception.
>>
>
> Is your class a Tapestry service (bound via Module class) or a Spring bean
> (defined in Spring applicationContext.xml)? ApplicationContextAware won't
> work in Tapestry services.
>
> --
> Chris
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry 5.25 & Spring Integration

Posted by Christian Köberl <ta...@gmail.com>.
On 2011-06-27 13:35, Rendy Tapestry wrote:
> I was follow the instruction here
> http://tapestry.apache.org/integrating-with-spring-framework.html
> to integrate spring with tapestry.
>
> I have one special class that implement Spring's ApplicationContextAware.
> But when application starting it never invoke
> setApplicationContext(ApplicationContext ctx) method. So when my application
> requiring the class to find specified bean, the program throw null pointer
> exception.

Is your class a Tapestry service (bound via Module class) or a Spring 
bean (defined in Spring applicationContext.xml)? ApplicationContextAware 
won't work in Tapestry services.

-- 
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org