Are you sure the module is loaded ? check the logs for that
Try using a simple hard coded id


On Sun, Apr 14, 2013 at 10:29 AM, ali alavi <ali.qwertyu...@gmail.com>wrote:

> Hi everybody,
>
> To try Tynamo security,  in AppModule I use these code:
>
>  public static void bind(ServiceBinder binder) {
>        binder.bind(AuthorizingRealm.class,
> UserRealm.class).withId(UserRealm.class.getSimpleName());
>     }
> public static void contributeWebSecurityManager(Configuration<Realm>
> configuration, @InjectService("UserRealm") AuthorizingRealm userRealm)
> {
>         configuration.add(userRealm);
>     }
>
> But when I build the project this error raises:
>
> SEVERE: Servlet.service() for servlet [default] in context with path
> [/drs] threw exception
> java.lang.RuntimeException: Exception constructing service
> 'WebSecurityManager': Error invoking service contribution method
> org.mrb.dars.services.AppModule.contributeWebSecurityManager(Configuration,
> AuthorizingRealm): Service id 'UserRealm' is not defined by any
> module.
>         at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75)
>         at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54)
>         at $WebSecurityManager_11e0039afb0.delegate(Unknown Source)
>
> Any idea?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to