title: IllegalAccessException doing Thymeleaf/OGNL method access
body: <p>I'm new to web dev and I'm trying Thymeleaf template engine on App Engine.  It has worked fine so far, except I always get java IllegalAccessException's when I attempt method (as opposed to simple attribute) access.</p>
  
  <p>For example, with this line of HTML:</p>
  
  <pre><code>&lt;div class="panel" th:id="${item.getWebId()}"&gt;
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>java.lang.IllegalAccessException:
  Method [public java.lang.String myapp.ItemInfo.getWebId()] cannot be accessed.
  at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:851) 
  </code></pre>
  
  <p>This happens both on dev server (Win Vista) and in production with GAE SDK's 1.9.0 and 1.8.9.  I've tried the current TL (2.1.2) and the previous version (2.0.20).  I'm not using Spring.</p>
  
  <p>I've found others having reflection problems (<a href="http://forum.thymeleaf.org/Strange-error-with-th-value-in-TL-2-1-2-snapshot-GAE-1-8-8-td4027254.html#a4027367" rel="nofollow">here</a> and <a href="http://forum.thymeleaf.org/Google-App-Engine-error-Thymeleaf-2-1-td4027046.html#a4027082" rel="nofollow">here</a>) on the TL forum, but nothing that helps.</p>
  
  <p>Some people using Struts or Spring encountered similar problems a long time ago, and resolved them by setting OgnlRuntime.setSecurityManager(null).  I haven't pursued this because I can't see how to access the OgnlRuntime object in TL, and it doesn't make much sense to me that I would be the only TL user to need this.</p>
  
  <p>Looking at <a href="http://grepcode.com/file/repo1.maven.org/maven2/ognl/ognl/3.0.6/ognl/OgnlRuntime.java?av=f" rel="nofollow">OgnlRuntime v3.0.6 (here)</a> it looks like the easiest solution would be to disable 'checkPermission', but again, as someone new to TL, I'm hesitant to make a change that TL doesn't expose, and that no one else using TL seems to need to do.  There must be something else wrong?</p>