Discussions

Ask a Question
Back to All

error when using @Restrict({@Group("some name")})

I have added the dependencies for deadbolt. when i run localhost:9000 it works fine, but when i use @Restrict({@Group("some name")}) for any api and call that api i get following error

[CompletionException: com.google.inject.ConfigurationException: Guice configuration errors:

  1. No implementation for be.objectify.deadbolt.java.cache.PatternCache was bound.
    while locating be.objectify.deadbolt.java.cache.PatternCache
    for the 3rd parameter of be.objectify.deadbolt.java.ConstraintLogic.(ConstraintLogic.java:58)
    while locating be.objectify.deadbolt.java.ConstraintLogic
    for the 4th parameter of be.objectify.deadbolt.java.actions.RestrictAction.(RestrictAction.java:48)
    while locating be.objectify.deadbolt.java.actions.RestrictAction

  2. No implementation for be.objectify.deadbolt.java.cache.SubjectCache was bound.
    while locating be.objectify.deadbolt.java.cache.SubjectCache
    for the 2nd parameter of be.objectify.deadbolt.java.ConstraintLogic.(ConstraintLogic.java:58)
    while locating be.objectify.deadbolt.java.ConstraintLogic
    for the 4th parameter of be.objectify.deadbolt.java.actions.RestrictAction.(RestrictAction.java:48)
    while locating be.objectify.deadbolt.java.actions.RestrictAction

2 errors]