Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6474

AccessControlException with eclipselink and groovy 2.2.1

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 2.2.1
    • None
    • groovy-runtime
    • linux mint, java 1.7_045, wls 12.1.2, eclipselink 2.4.2

    Description

      I have been using groovy-all version 2.1.4 without issue, and decided to try to upgrade to 2.2.1.

      Using a webapp with eclipselink. Eclipselink is using groovy to modify database entity objects, but causes AccessControlExceptions to now be thrown.

      Stack trace as follows:

      java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
      at java.security.AccessController.checkPermission(AccessController.java:559)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      at java.lang.Class.checkMemberAccess(Class.java:2237)
      at java.lang.Class.getDeclaredMethods(Class.java:1854)
      at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getAbstractMethods(CachedSAMClass.java:91)
      at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getSAMMethod(CachedSAMClass.java:155)
      at org.codehaus.groovy.reflection.ClassInfo.isSAM(ClassInfo.java:280)
      at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:270)
      at org.codehaus.groovy.reflection.ClassInfo.access$400(ClassInfo.java:36)
      at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:441)
      at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:432)
      at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
      at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
      at org.codehaus.groovy.reflection.ClassInfo.getCachedClass(ClassInfo.java:89)
      at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:107)
      at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:189)
      at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:93)
      at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:71)
      at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:33)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:162)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:192)
      at com.acme.services.functions.custom.CustomFunction_ProjectCPFlexCostEO_4209.$getStaticMetaClass(script1386366131860219549799.groovy)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dbrosius David Brosius
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment