I am trying to convert an object into JSON using the GSON library on Google App Engine. For some reason, it throws this exception and I don\'t understand how to solve this.
I experienced a similar problem recently.
I was running Gson to parse JSON and it worked well for a long time so I didn't worry about GAE not allowing Reflection on it's platform.
I introduced a HashMap the Form class and it worked well in my local system with Gson doing JSON Parse perfectly.
But when I deployed that code to the Google App Engine Cloud it failed with the following exception:
java.lang.SecurityException: java.lang.IllegalAccessException: Reflection is not allowed on private final int java.lang.ThreadLocal.threadLocalHashCode
So now I've switched to Jackson JSON Parser which is faster and does not use reflection - but yes - more work.