You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Thiago H. de Paula Figueiredo" <th...@gmail.com> on 2009/03/09 01:05:33 UTC
Re: problem tapestry-spring-security plugin: UserDetailsService
implementation not found
Em Sun, 08 Mar 2009 18:09:29 -0300, manuel aldana <al...@gmx.de> escreveu:
> Exception constructing service 'RememberMeServices': Error invoking
> service builder method
> nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService,
> String) (at SecurityModule.java:303) (for service 'RememberMeServices'):
> No service implements the interface
> org.springframework.security.userdetails.UserDetailsService.
> It does not find the UserDetailsService implementation though I placed
> one inside <rootPackage>.services.internal. Does somebody know how
> tapestry spring-security plugin looks for the implementation?
It looks it up via Tapestry-IoC. Actually, this error messages is given by
T-IoC, not Tapestry-Spring Security yourself. Just make sure you declare
your UserDetailsService implementation as a service in your AppModule
class (or any other Tapestry-IoC module).
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: problem tapestry-spring-security plugin: UserDetailsService
implementation not found
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Sun, 08 Mar 2009 23:31:49 -0300, manuel aldana <al...@gmx.de> escreveu:
> But I wonder why it works in the sample application from the
> tapestry-spring-security module, which has no AppModule defined. I guess
> then some tapestry magic comes in place (maybe scanning for implementors
> of interfaces...).
I couldn't find it in the Tapestry IoC documentation, but some time ago
Howard added the featuring that when you binder.bind(SomeInterface.class),
it looks for a SomeInterfaceImpl class in the same package. If found, the
binding is done automatically. I guess that's what happens in the Tapestry
Spring Security example.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: problem tapestry-spring-security plugin: UserDetailsService implementation
not found
Posted by Michael Gerzabek <mi...@gmx.net>.
As the name says, the sample application does declare the
UserDetailsService. Look at
nu.localhost.tapestry5.springsecuritytest.services.TestsecurityModule
there you'll find the build method
public static UserDetailsService buildUserDetailsService( @Inject
PasswordEncoder encoder, @Inject
SaltSource salt ) {
return new MyUserDetailsService( encoder, salt );
}
This module is in fact using the SpringSecurityModule like you'll
probably do.
manuel aldana schrieb:
> Thiago H. de Paula Figueiredo schrieb:
>> Em Sun, 08 Mar 2009 18:09:29 -0300, manuel aldana <al...@gmx.de>
>> escreveu:
>>
>>> Exception constructing service 'RememberMeServices': Error invoking
>>> service builder method
>>> nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService,
>>> String) (at SecurityModule.java:303) (for service
>>> 'RememberMeServices'): No service implements the interface
>>> org.springframework.security.userdetails.UserDetailsService.
>>> It does not find the UserDetailsService implementation though I
>>> placed one inside <rootPackage>.services.internal. Does somebody
>>> know how tapestry spring-security plugin looks for the implementation?
>>
>> It looks it up via Tapestry-IoC. Actually, this error messages is
>> given by T-IoC, not Tapestry-Spring Security yourself. Just make sure
>> you declare your UserDetailsService implementation as a service in
>> your AppModule class (or any other Tapestry-IoC module).
> Yes, you're right adding this interface->implementation mapping to
> AppModule made it work.
>
> But I wonder why it works in the sample application from the
> tapestry-spring-security module, which has no AppModule defined. I
> guess then some tapestry magic comes in place (maybe scanning for
> implementors of interfaces...).
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: problem tapestry-spring-security plugin: UserDetailsService implementation
not found
Posted by manuel aldana <al...@gmx.de>.
Thiago H. de Paula Figueiredo schrieb:
> Em Sun, 08 Mar 2009 18:09:29 -0300, manuel aldana <al...@gmx.de>
> escreveu:
>
>> Exception constructing service 'RememberMeServices': Error invoking
>> service builder method
>> nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService,
>> String) (at SecurityModule.java:303) (for service
>> 'RememberMeServices'): No service implements the interface
>> org.springframework.security.userdetails.UserDetailsService.
>> It does not find the UserDetailsService implementation though I
>> placed one inside <rootPackage>.services.internal. Does somebody know
>> how tapestry spring-security plugin looks for the implementation?
>
> It looks it up via Tapestry-IoC. Actually, this error messages is
> given by T-IoC, not Tapestry-Spring Security yourself. Just make sure
> you declare your UserDetailsService implementation as a service in
> your AppModule class (or any other Tapestry-IoC module).
Yes, you're right adding this interface->implementation mapping to
AppModule made it work.
But I wonder why it works in the sample application from the
tapestry-spring-security module, which has no AppModule defined. I guess
then some tapestry magic comes in place (maybe scanning for implementors
of interfaces...).
--
manuel aldana
aldana@gmx.de
software-engineering blog: http://www.aldana-online.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org