Copied over from the Ki issue. Original text:
Entries in a ShiroFilter configuration are not being processed in the order they are listed in.
If we have these lines:
securityManager.sessionManager = $sessionManager
securityManager.sessionDAO = $sessionDAO
...and line 3 is processed before line 2, the setSessionManager() call for the first line fails because the sessionManager is a ServletContainerSessionManager rather than a DefaultWebSessionManager.
In ReflectionBuilder.buildObjects(), instanceMap and propertyMap need
to be LinkedHashMap type, not just HashMap. With HashMap, the
properties in ShiroFilter are being processed in arbitrary order,
rather than the order listed.
See the "need more help with SSO" thread in the Shiro mailing list: