Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2273

getClassLoader-permission required accessing classes from dynamically loaded class

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: framework-2.0.4
    • Fix Version/s: framework-3.0.0
    • Component/s: Framework
    • Labels:
      None

      Description

      Using compiled scripts in clerezza as unpriledged users in clerezza yields to the exception below, I guess felix should get the ClassLoader as priviledged as this is not the permission one expects to need for simply using a class.

      Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
      at java.security.AccessController.checkPermission(AccessController.java:553)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      at java.lang.Class.getClassLoader(Class.java:611)
      at org.apache.felix.framework.ModuleImpl.isClassNotLoadedFromBundle(ModuleImpl.java:1577)
      at org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1530)
      at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:765)
      at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
      at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
      at exception_templatebab01985c378e091c11d7b48ae16c8fc.main(exception_templatebab01985c378e091c11d7b48ae16c8fc)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.apache.clerezza.scala.interpreter.ScalaInterpreter.execute(ScalaInterpreter.scala:269)
      at org.apache.clerezza.scala.interpreter.ScalaInterpreter.execute(ScalaInterpreter.scala:292)
      at org.apache.clerezza.scala.service.CompiledScript.execute(CompiledScript.scala:77)
      at org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet.render(ScalaServerPagesRenderlet.java:136)
      ... 36 more

        Attachments

          Activity

            People

            • Assignee:
              karlpauls Karl Pauls
              Reporter:
              reto Reto Gmür
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: