You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ali alavi <al...@gmail.com> on 2013/04/14 10:29:48 UTC

Service id * is not defined by any module

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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Service id * is not defined by any module

Posted by Muhammad Gelbana <m....@gmail.com>.
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 <al...@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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>