Home Grails 3 shrio to spring-security-shiro plugin migration causing UnavailableSecurityManagerException
Reply: 0

Grails 3 shrio to spring-security-shiro plugin migration causing UnavailableSecurityManagerException

user1055
1#
user1055 Published in May 27, 2018, 11:31 pm

I am in the process of migration my app from grails 2.4.4 to grails 3.2.9.

I am trying to migrate the shiro plugin from

compile "org.apache.shiro:shiro-spring:1.2.2"

to:

compile 'org.grails.plugins:spring-security-shiro:3.0.1'

However after the migration whenever the following is called in my user permission service:

Subject subject = SecurityUtils.getSubject()

I get the error:

Caused by: org.apache.shiro.UnavailableSecurityManagerException:
 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.

Apart form the code generated by grails s2-quickstart

And the instructions in: http://grails-plugins.github.io/grails-spring-security-shiro/v3/index.html#using-shiro-directly

Is there any other new shiro config that is needed?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.336919 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO