55minutes/fiftyfive-wicket — Issue #25: shiro with database
Author: frodrigues
Created: 2012-01-31 09:20:44+00:00
State: open

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