Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-135

AccessControlException exception on GAE with Grails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None
    • Google App Engine, Grails

    Description

      Hi!

      I was doing the following:

      ---- SNIP ------

      export CLASSPATH=""
      grails create-app MyApp
      cd MyApp
      grails install-plugin app-engine
      (choosing jdo)
      grails uninstall-plugin tomcat
      grails set-version 1
      grails install-plugin shiro
      grails quick-start
      grails app-engine package
      $APPENGINE_SDK/bin/appcfg.sh update target/war

      ---- SNIP ------

      I use the following Version:
      grails 1.2.0
      app-engine plugin 0.8.8
      shiro plugin 1.0.1
      appengine java SDK 1.3.0

      Checking the app engine Logs gives me the following exception and stacktrace:

      ---- SNIP ------
      javax.servlet.ServletContext log: Initializing Spring root WebApplicationContext
      [Runtime Network Thread] ERROR servlet.AbstractFilter - Unable to start Filter: [access denied
      (java.lang.RuntimePermission getClassLoader)].
      java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:355)
      at java.security.AccessController.checkPermission(AccessController.java:567)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at
      com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:45)
      at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
      at org.apache.shiro.util.ClassUtils.getResourceAsStream(ClassUtils.java:73)
      at org.apache.shiro.io.ResourceUtils.loadFromClassPath(ResourceUtils.java:158)
      at org.apache.shiro.io.ResourceUtils.getInputStreamForPath(ResourceUtils.java:122)
      at org.apache.shiro.io.ResourceUtils.resourceExists(ResourceUtils.java:92)
      at org.apache.shiro.config.IniConfiguration.init(IniConfiguration.java:101)
      at org.apache.shiro.spring.SpringIniWebConfiguration.init(SpringIniWebConfiguration.java:96)
      at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:47)
      at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:41)
      at org.apache.shiro.web.servlet.ShiroFilter.configure(ShiroFilter.java:353)
      at org.apache.shiro.web.servlet.ShiroFilter.onFilterConfigSet(ShiroFilter.java:287)
      at org.apache.shiro.web.servlet.AbstractFilter.init(AbstractFilter.java:94)
      at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
      ---- SNIP ------

      After putting

      debug 'org.apache.shiro.io'

      into the log-section of Config.groovy I get the additional log line:

      [Runtime Network Thread] DEBUG io.ResourceUtils - Opening resource from class path [shiro.ini]

      just before the error.

      Attachments

        Activity

          People

            lhazlewood Les Hazlewood
            biafra Dirk Jäckel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: