title: Cannot invoke method list on null object
body: <p>I am trying to follow the ajax - driven select tutorial here: <a href="http://grails.org/AJAX-Driven+SELECTs+in+GSP" rel="nofollow">http://grails.org/AJAX-Driven+SELECTs+in+GSP</a> however, I get the following error:</p>
  
  <pre><code>URI
      /ajaxSelects/
  Class
      java.lang.NullPointerException
  Message
      Cannot invoke method list() on null object
  </code></pre>
  
  <p>I followed the tutorial exactly. The problem seems to be from the following code, where grails does not like Country.list():</p>
  
  <pre><code>&lt;g:select
          optionKey="id" optionValue="name" 
          name="country.nameid="country.name" from="${Country.list()}"
          onchange="${remoteFunction(
          controller:'country',
          action:'ajaxGetCities',
          params:'\'id=\' + escape(this.value)',
          onComplete:'updateCity(e)')}"
  &gt;&lt;/g:select&gt;
  </code></pre>
  
  <p>Any ideas as to why this code is not working? </p>