Uploaded image for project: 'Clojure'
  1. CLJ-127

DynamicClassLoader's call to ClassLoader.getSystemClassLoader is prohibited in some environments

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Not Reproducible
    • Affects versions: None
    • Fix versions: None
    • Labels:

      Description

      Currently, clojure.lang.DynamicClassLoader's constructor has the
      following call to super():

      super(EMPTY_URLS,
            (Thread.currentThread().getContextClassLoader() == null ||
              Thread.currentThread().getContextClassLoader() == ClassLoader.getSystemClassLoader()) ?
                Compiler.class.getClassLoader() : Thread.currentThread().getContextClassLoader());
      

      That call to ClassLoader.getSystemClassLoader() is forbidden by Google
      AppEngine's security policies. That restricts you from being able to
      load any resources from the classpath that haven't been AOT-compiled.
      I've verified that just removing that removing the " ||
      Thread.currentThread().getContextClassLoader() ==
      ClassLoader.getSystemClassLoader()" does in fact result in something
      that works in GAE (as far as my needs go). Unfortunately, I'm not sure
      whether that breaks anything, which, presumably, it does.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: