jsf 2 - Error when trying to use custom realm for Shiro -


using balusc tutorial implementing shiro jsf app http://balusc.blogspot.fi/2013/01/apache-shiro-is-it-ready-for-java-ee-6.html

currently trying add own custom realm on top of example, missing something.

i have shiro.ini follows (mainly copied given tutorial , not necessary):

[main] user = com.example.filter.ajaxsessionfilter mockrealm = com.example.realm.mockrealm authc.loginurl = /login.xhtml user.loginurl = /login.xhtml  [users] admin = password  [urls] /login.xhtml = user /* = user securitymanager.realms = $mockrealm 

my mockrealm in short:

import org.apache.shiro.realm.authorizingrealm;  public class mockrealm extends authorizingrealm { /* implement stuff */ } 

i running on glassfish v4.1. worked far correctly until tried add custom realm. results in following error:

exception while loading app : java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.illegalargumentexception: there no filter name '$mockrealm' apply chain [securitymanager.realms] in pool of available filters.  ensure filter name/path has first been registered addfilter method(s).  

i fail find information error, neither can find example how implement custom realm correctly.

could 1 point me right direction? thanks.

well, happens (annoyingly) often.
after sleep realized securitymanager.realms = $mockrealm @ wrong part of shiro.ini.
moved under [main] , worked.
sometimes have forget things while fresh @ them.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -