Groovy is trying to use reflection to set the private
fields<http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#BExOlTNH8oU/grails/src/web/org/codehaus/groovy/grails/web/util/StringCharArrayAccessor.java&q=StringCharArrayAccessor.java&l=178>of
java.lang.String as an optimization. This only works if Groovy is
granted
unsafe JVM reflection permissions, which we don't do in GAE. When this
fails, Groovy automatically reverts to the safe, normal way of creating a
string, which works just fine.
You're seeing this error in dev_appserver in 1.2.6, because we've done a lot
of work to make the dev_appserver more closely mirror the security
restrictions in prod. If you want to prevent Groovy from even attempting to
try this, you can set the System
property, "stringchararrayaccessor.disabled" to true.

On Sun, Oct 18, 2009 at 4:41 AM, aldrinm <[email protected]> wrote:

>
> Hi,
>
> What does this exception indicate? "Unable to use direct char[] access
> of java.lang.String. Disabling this method.
>     [java] java.lang.IllegalAccessException: Private fields can not
> be set on JRE classes."
> This has started occurring after updating the GAE SDK to the latest
> (ver 1.2.7 - 2009-10-15). Tried googling but absolutely nothing! I'm
> using grails and do not understand what the framework is doing. Though
> the app continues to work irrespective of this error, am curious abt
> this. Here is a part of the stack trace.
>
>
>     [java] Unable to use direct char[] access of java.lang.String.
> Disabling this method.
>     [java] java.lang.IllegalAccessException: Private fields can not
> be set on JRE classes.
>     [java]     at
> com.google.appengine.tools.development.agent.runtime.Runtime.verifyWritable
> (Runtime.java:81)
>     [java]     at
> com.google.appengine.tools.development.agent.runtime.Runtime.verifyAndRun
> (Runtime.java:335)
>     [java]     at
> com.google.appengine.tools.development.agent.runtime.Runtime.set
> (Runtime.java:229)
>     [java]     at
> org.codehaus.groovy.grails.web.util.StringCharArrayAccessor.createString
> (StringCharArrayAccessor.java:168)
>     [java]     at
> org.codehaus.groovy.grails.web.util.StreamCharBuffer.readAsString
> (StreamCharBuffer.java:294)
>     [java]     at
> org.codehaus.groovy.grails.web.util.StreamCharBuffer.toString
> (StreamCharBuffer.java:312)
>     [java]     at
> org.codehaus.groovy.grails.web.pages.FastStringWriter.toString
> (FastStringWriter.java:47)
>     [java]     at
> org.codehaus.groovy.grails.web.taglib.GroovyPageTagWriter.getValue
> (GroovyPageTagWriter.java:36)
>     [java]     at
> org.codehaus.groovy.grails.web.pages.GroovyPage.captureTagOutput
> (GroovyPage.java:351)
>     [java]     at org.codehaus.groovy.grails.web.pages.GroovyPage
> $captureTagOutput.call(Unknown Source)
>     [java]     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
> (CallSiteArray.java:40)
>     [java]     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
> (AbstractCallSite.java:117)
>     [java]     at
> org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils
> $_registerMethodMissingForTags_closure13.doCall(WebMetaUtils.groovy:
> 128)
>     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
> Thanks,
> Aldrin
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to