Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-744

StringUtils throws java.security.AccessControlException on Google App Engine

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.1
    • lang.*
    • None
    • Google App Engine

    Description

      In the static initializer of org.apache.commons.lang3.StringUtils, there is an attempt to load the class sun.text.Normalizer.
      Such a class is prohibited on Google App Engine, and the static intializer throws a java.security.AccessControlException.

      Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.text)
      	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
      	at java.security.AccessController.checkPermission(AccessController.java:546)
      	at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
      	at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
      	at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512)
      	at java.lang.Class.checkMemberAccess(Class.java:2164)
      	at java.lang.Class.getMethod(Class.java:1602)
      	at org.apache.commons.lang3.StringUtils.<clinit>(StringUtils.java:739)
      

      The exception should be caught in the catch clauses around loadClass("sun.text.Normalizer").

      Commons lang 2 worked fine on GAE.

      Attachments

        1. LANG-744.patch
          4 kB
          Sebb

        Activity

          People

            Unassigned Unassigned
            clement.denis Clément Denis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: