title: Grails upgrade to 2.2.2 fails with ClassNotFoundException on migration script
body: <p>I'm getting a strange stack trace when trying to upgrade my Grails project from 2.1.1 to 2.2.2,</p>
  
  <pre><code>| Error 2013-05-01 17:54:46,935 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.GrailsConfigurationException: Class not found loading Grails application: devportal.schema.schema-0
  Message: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.GrailsConfigurationException: Class not found loading Grails application: devportal.schema.schema-0
     Line | Method
  -&gt;&gt; 303 | innerRun in java.util.concurrent.FutureTask$Sync
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  |   138 | run      in java.util.concurrent.FutureTask
  |   895 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
  |   918 | run      in     ''
  ^   680 | run . .  in java.lang.Thread
  
  Caused by GrailsConfigurationException: Class not found loading Grails application: devportal.schema.schema-0
  -&gt;&gt; 303 | innerRun in java.util.concurrent.FutureTask$Sync
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  |   138 | run      in java.util.concurrent.FutureTask
  |   895 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
  |   918 | run      in     ''
  ^   680 | run . .  in java.lang.Thread
  
  Caused by ClassNotFoundException: devportal.schema.schema-0
  -&gt;&gt; 202 | run      in java.net.URLClassLoader$1
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  |   190 | findClass in java.net.URLClassLoader
  |   306 | loadClass in java.lang.ClassLoader
  |   303 | innerRun in java.util.concurrent.FutureTask$Sync
  |   138 | run . .  in java.util.concurrent.FutureTask
  |   895 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
  |   918 | run . .  in     ''
  ^   680 | run      in java.lang.Thread
  </code></pre>
  
  <p>For some reason it looks like it is trying to run my database migrations from the <a href="http://grails.org/plugin/database-migration" rel="nofollow">Database Migrations plugin</a>.</p>
  
  <p>I found a <a href="http://grails.1312388.n4.nabble.com/Database-migration-issue-with-2-2-upgrade-td4639493.html" rel="nofollow">mailing list post</a> on the subject, </p>
  
  <blockquote>
    <p>It looks like I can actually add:
         package current
         to my migrations to fix the problem.
         Maybe I should have had this all along?</p>
  </blockquote>
  
  <p>But adding my package to my scripts didn't help (I even tried <code>current</code>).</p>
  
  <p>Anyone have any idea?</p>