title: Shiro ini not found or empty/unconfigured
body: <p>I'm using NetBean 8.2 to learn how to use Apache Shiro but running into a deployment issue. When I try to debug the web app on Glassfish 4.0, I'm getting this error:</p>
  
  <pre><code>Severe:   Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.shiro.config.ConfigurationException: Shiro INI configuration was either not found or discovered to be empty/unconfigured.
  </code></pre>
  
  <p>The error message is exactly like that found in this post: <a href="https://stackoverflow.com/questions/31804499/netbeans-8-0-1-cant-find-shiro-ini">netbeans 8.0.1 cant find shiro.ini</a>. However, my Shiro.ini is already in WEB-INF folder (confirm by peeking into WAR file).</p>
  
  <h1>Shiro ini</h1>
  
  <pre><code>[main]
  user.loginUrl = /login.xhtml
  jdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm
  jdbcRealm.authenticationQuery = select password from users where username = ?
  jdbcRealm.userRolesQuery = select name from roles where userid = (select id from users where username = ?)
  
  ds = com.mysql.jdbc.jdbc2.optional.MysqlDataSource
  ds.jdbcUrl=jdbc:mysql://&lt;serverip&gt;/&lt;databasename&gt;
  ds.user = &lt;username&gt;
  ds.password = &lt;password&gt;
  jdbcRealm.dataSource = $ds
  securityManager.realms = $jdbcRealm
  
  [urls]
  /login.xhtml = user
  </code></pre>
  
  <h1>Web.xml</h1>
  
  <pre><code>&lt;listener&gt;
  &lt;listener-class&gt;
          org.apache.shiro.web.env.EnvironmentLoaderListener
  &lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;filter&gt;
      &lt;filter-name&gt;ShiroFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.shiro.web.servlet.ShiroFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;configPath&lt;/param-name&gt;
          &lt;param-value&gt;classpath:shiro.INI&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;ShiroFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
      &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
      &lt;dispatcher&gt;INCLUDE&lt;/dispatcher&gt;
      &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>With or without the init-param node, the same error is shown in the console log.</p>