You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 5, 2020. It is now read-only.
Hello,
I setup shiro.ini to connect with database (mysql) by gives me the following error:
Last cause: 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.
my shiro.ini
[main]
jdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm
jdbcRealm.authenticationQuery = select password from user where username = ?
jdbcRealm.userRolesQuery = select role_id from user_role where user_id = ?
@frodrigues, I would have to see the full stack trace to be sure, but that error usually means you are accessing Shiro-related code in your application before the Shiro servlet filter has executed.
Make sure the ShiroFilter is present in your web.xml and that the <filter-mapping> for ShiroFilter it is declared before any other filters that have to do with your application code, like Wicket-, Spring- or Hibernate-related filters.
The Shiro web.xml declarations should look like this:
Hello,
I setup shiro.ini to connect with database (mysql) by gives me the following error:
Last cause: 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.
my shiro.ini
[main]
jdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm
jdbcRealm.authenticationQuery = select password from user where username = ?
jdbcRealm.userRolesQuery = select role_id from user_role where user_id = ?
ds = com.mysql.jdbc.Driver
ds.jdbcUrl = jdbc:mysql://localhost:3306/database
ds.username = root
ds.password = ****
ds.databaseName = database
jdbcRealm.dataSource = $ds
The text was updated successfully, but these errors were encountered: