title: Holders.grailsApplication.config is null when deploying to tomcat
body: <p>I'm running grails 2.2.4.  The following code works fine in development.  When I deploy the war file to tomcat an exception is thrown that grailsApplication.config is null:</p>
  
  <pre><code>import grails.util.Holders
  
  public enum PhotoSize {
  
      PROFILE(Holders.grailsApplication.config.img.profile.height, Holders.grailsApplication.config.img.profile.width),
      SEARCH_RESULT(Holders.grailsApplication.config.img.search.height, Holders.grailsApplication.config.img.search.width),
      GALLERY(Holders.grailsApplication.config.img.gallery.full.height, Holders.grailsApplication.config.img.gallery.full.width),
      GALLERY_THUMBNAIL(Holders.grailsApplication.config.img.gallery.thumbnail.height, Holders.grailsApplication.config.img.gallery.thumbnail.width),
      MEMBER_THUMBNAIL(Holders.grailsApplication.config.img.member.thumbnail.height, Holders.grailsApplication.config.img.member.thumbnail.width)
  
      //def config = Holders.config
  
  
       //def grailsApplication
  ...
  </code></pre>
  
  <p>I'm trying to set some enum values by loading them from Config.groovy.  A workaround is to just hard code the values since they aren't likely to change.  However I am curious as to why the config file would be null.  Also is it not possible to inject grailsApplication into an enum?</p>
  
  <p>I'm calling Holders.grailsApplication.  Injecting grailsApplication doesn't solve the problem.</p>