groovy
  1. groovy
  2. GROOVY-4950

ConfigSlurper broken on AppEngine

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 2.0.6, 2.1.0-beta-1, 1.8.9
    • Component/s: None
    • Labels:
      None
    • Environment:
      AppEngine Java 1.5.2 Production
    • Number of attachments :
      0

      Description

      On the production AppEngine environment, ConfigSlurper now breaks in 1.8.1 (This was working in 1.8.0) This makes Groovy 1.8.1 unusable on GAE as it stands!

      Exception:

      Caused by: java.lang.SecurityException: Unable to get members for class groovy.util.ConfigObject
      	at com.google.appengine.runtime.Request.process-f6979038393db0ef(Request.java)
      	at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
      	at java.security.AccessController.doPrivileged(AccessController.java:34)
      	at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
      	at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
      	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.CachedClass.getMethods(CachedClass.java:250)
      	at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:340)
      	at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:290)
      	at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2915)
      	at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166)
      	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182)
      	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:242)
      	at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:751)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:71)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
      	at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:160)
      ...
      

      Note: This error does not occur on the GAE dev server.

        Activity

        Hide
        Axel Fontaine added a comment -

        As this doesn't seem to be on the radar for the next few releases, I have now moved to Json and JsonSlurper which work great on GAE and are both simpler and faster.

        Please note that as I stated in the original report, this was a clear regression between 1.8.0 and 1.8.1

        Show
        Axel Fontaine added a comment - As this doesn't seem to be on the radar for the next few releases, I have now moved to Json and JsonSlurper which work great on GAE and are both simpler and faster. Please note that as I stated in the original report, this was a clear regression between 1.8.0 and 1.8.1
        Hide
        blackdrag blackdrag added a comment -

        I assign it to our appengine expert Guillaume, unless for example Roshan wants to take it

        Show
        blackdrag blackdrag added a comment - I assign it to our appengine expert Guillaume, unless for example Roshan wants to take it
        blackdrag blackdrag made changes -
        Field Original Value New Value
        Assignee Guillaume Laforge [ guillaume ]
        Guillaume Laforge made changes -
        Description On the production AppEngine environment, ConfigSlurper now breaks in 1.8.1 (This was working in 1.8.0) This makes Groovy 1.8.1 unusable on GAE as it stands!

        Exception:
        Caused by: java.lang.SecurityException: Unable to get members for class groovy.util.ConfigObject
        at com.google.appengine.runtime.Request.process-f6979038393db0ef(Request.java)
        at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
        at java.security.AccessController.doPrivileged(AccessController.java:34)
        at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
        at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
        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.CachedClass.getMethods(CachedClass.java:250)
        at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:340)
        at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:290)
        at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2915)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:242)
        at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:751)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:71)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
        at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:160)
        ...

        Note: This error does not occur on the GAE dev server.
        On the production AppEngine environment, ConfigSlurper now breaks in 1.8.1 (This was working in 1.8.0) This makes Groovy 1.8.1 unusable on GAE as it stands!

        Exception:
        {code}
        Caused by: java.lang.SecurityException: Unable to get members for class groovy.util.ConfigObject
        at com.google.appengine.runtime.Request.process-f6979038393db0ef(Request.java)
        at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
        at java.security.AccessController.doPrivileged(AccessController.java:34)
        at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
        at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
        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.CachedClass.getMethods(CachedClass.java:250)
        at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:340)
        at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:290)
        at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2915)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:242)
        at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:751)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:71)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
        at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:160)
        ...
        {code}
        Note: This error does not occur on the GAE dev server.
        Hide
        Vitalii Fedorenko added a comment -

        I can confirm that the bug is still reproducible with Groovy 2.0.1 and Google App Engine 1.7.1

        Show
        Vitalii Fedorenko added a comment - I can confirm that the bug is still reproducible with Groovy 2.0.1 and Google App Engine 1.7.1
        Hide
        Guillaume Laforge added a comment -

        For reproducing the issue, the simple statement below exhibits the problem on the Groovy Web Console:

        new ConfigSlurper().parse('')
        
        Show
        Guillaume Laforge added a comment - For reproducing the issue, the simple statement below exhibits the problem on the Groovy Web Console: new ConfigSlurper().parse('')
        Hide
        Guillaume Laforge added a comment -

        I've rewritten the ConfigObject class in Java, to circumvent the odd security constraints of Google App Engine.

        Show
        Guillaume Laforge added a comment - I've rewritten the ConfigObject class in Java, to circumvent the odd security constraints of Google App Engine.
        Guillaume Laforge made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.6 [ 18852 ]
        Fix Version/s 1.8.9 [ 18778 ]
        Fix Version/s 2.1.0 [ 18598 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        David Huggins Daines added a comment -

        Good idea although it has the side effect that ConfigObject no longer implements Cloneable, which unexpectedly breaks people's code...

        Show
        David Huggins Daines added a comment - Good idea although it has the side effect that ConfigObject no longer implements Cloneable, which unexpectedly breaks people's code...

          People

          • Assignee:
            Guillaume Laforge
            Reporter:
            Axel Fontaine
          • Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: