I'm using a combination of shiro & struts2 and have no problems when this is
a standalone web application.
However, when I try and make that same web application into a JSR 168
portlet via the struts2 portlet plug-in (as I've done successfully many
times before), I always get a "UnavailableSecurityManagerException" with the
message:
"No SecurityManager accessible to the calling code, either bound to the
org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an
invalid application configuration."
When I traced into the shiro code, the following sequence occurred:
SecurityUtils->getSubject()
-ThreadContext.getSubject() returned null
-(new Subject.Builder()).buildSubject();
-ThreadContext.getSecurityManager(); returned null
-SecurityUtils.securityManager is also null
-throws UnavailableSecurityManagerException
I'm not even sure if shiro supports this type of implementation, or if this
is the correct forum to post this, but I'd love to use shiro in my portlet
if possible.
I'm using shiro 1.1.0 and struts 2.2.1.1
Any suggestions?
Thanks in advance,
Todd Kofford
[email protected]
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/Shiro-enabled-Portlet-UnavailableSecurityManagerException-tp6334470p6334470.html
Sent from the Shiro User mailing list archive at Nabble.com.