title: upgrading grails from 2.1.5 to 2.4.4
body: <p>i am trying to upgrade our grails app from 2.1.5 to 2.4.4.
  i've created a new 2.4.4 project and copied all the sources from existing project.
  and java from 7 to 8.</p>
  <p>build config is</p>
  <pre><code>grails.servlet.version = &quot;3.0&quot; // Change depending on target container compliance (2.5 or 3.0)
  
  grails.project.class.dir = &quot;target/classes&quot;
  
  grails.project.test.class.dir = &quot;target/test-classes&quot;
  
  grails.project.test.reports.dir = &quot;target/test-reports&quot;
  
  //grails.project.work.dir = &quot;target/work&quot;
  
  grails.project.target.level = 1.8
  
  grails.project.source.level = 1.8
  
  //grails.project.war.file = &quot;target/${appName}-${appVersion}.war&quot;
  
  grails.project.dependency.resolver = &quot;ivy&quot;
  
  /*grails.project.fork = [
  // configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
  //  compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
  
  // configure settings for the test-app JVM, uses the daemon by default
  test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
  // configure settings for the run-app JVM
  run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
  // configure settings for the run-war JVM
  war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
  // configure settings for the Console UI JVM
  console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
  ]
  */
  
  System.setProperty(&quot;logback.configurationFile&quot;, &quot;${basedir}/grails-app/conf/logback-build.xml&quot;)
  
  
  grails.project.dependency.resolution = {
      // inherit Grails' default dependencies
  
      inherits(&quot;global&quot;) {
          // specify dependency exclusions here; for example, uncomment this to disable ehcache:
  
          // excludes 'ehcache'
  
          excludes 'grails-plugin-log4j' , 'log4j'
  
      }
  
      log &quot;warn&quot; // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
  
      checksums true // Whether to verify checksums on resolve
  
    //  legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
  
  
      repositories {
          inherits true // Whether to inherit repository definitions from plugins
  
          grailsPlugins()
          grailsHome()
          grailsCentral()
          mavenCentral()
          mavenLocal()
  
          grailsRepo &quot;https://grails.org/plugins&quot;
          mavenRepo &quot;http://repo.grails.org/grails/repo&quot;
          mavenRepo &quot;http://repo1.maven.org/maven2/&quot;
          mavenRepo &quot;https://repo1.maven.org/maven2/&quot;
          mavenRepo &quot;https://repo.grails.org/grails/plugins/&quot;
          mavenRepo &quot;http://repo.grails.org/grails/libs-releases/&quot;
      
          // uncomment these to enable remote dependency resolution from public Maven repositories
          //mavenRepo &quot;http://snapshots.repository.codehaus.org&quot;
          //mavenRepo &quot;http://repository.codehaus.org&quot;
          //mavenRepo &quot;http://download.java.net/maven/2/&quot;
          //mavenRepo &quot;http://repository.jboss.com/maven2/&quot;
      }
  
      dependencies {
      
      runtime 'xalan:serializer:2.7.1'
      compile 'commons-net:commons-net:2.0'
      compile 'org.grails.plugins:logback:0.3.1'
  //  runtime &quot;ch.qos.logback:logback-core:0.9.29&quot;
      
      
      compile 'org.springframework.ws:spring-ws:2.1.0.RELEASE'
  
      
      '
  
      runtime 'org.mariadb.jdbc:mariadb-java-client:2.2.4'
      compile 'org.grails.plugins:rendering:1.0.1-SNAPSHOT'
      //compile(&quot;mysql:mysql-connector-java:8.0.13&quot;)
      runtime 'mysql:mysql-connector-java:5.1.16'
      test &quot;org.grails:grails-datastore-test-support:1.0-grails-2.4&quot;
  }
  
  plugins {
      // plugins for the build system only
      build &quot;:tomcat:7.0.55&quot;
  
      
      // plugins for the compile step
      compile &quot;:scaffolding:2.1.2&quot;
      compile ':cache:1.1.7'
      compile (&quot;:asset-pipeline:2.6.9&quot;) {
  
          excludes 'grails-plugin-log4j' , 'log4j'
      }
  
      // plugins needed at runtime but not for compilation
     runtime &quot;:hibernate4:4.3.5.5&quot; //&quot;:hibernate:3.6.10.18&quot; // or &quot;&quot; :hibernate4:4.3.6.1
      
      
      runtime &quot;:database-migration:1.4.0&quot;
      //runtime ':database-migration:1.3.1'
      runtime &quot;:jquery:1.11.1&quot;
      
      compile &quot;:spring-security-core:2.0.0&quot;
  
      
      compile &quot;:remoting:1.3&quot;
  
      
      compile(&quot;:ws-client:1.0&quot;) {
          excludes &quot;org.codehaus.woodstox:wstx-asl:3.2.8&quot;
      }
      
      compile(&quot;org.grails.plugins:blueprint:1.0.2&quot;)
      compile(&quot;org.grails.plugins:executor:0.3&quot;)
      compile(&quot;org.grails.plugins:export:1.5&quot;)
      
      //  compile(&quot;org.grails.plugins:mail:1.0&quot;)
      //  compile(&quot;org.grails.plugins:mysql-connectorj:5.1.22.1&quot;)
          compile(&quot;org.grails.plugins:quartz:1.0.2&quot;)
      
          compile(&quot;org.grails.plugins:remote-pagination:0.3&quot;)
          compile(&quot;org.grails.plugins:rest:0.8&quot;)      
      //  compile 'org.grails.plugins:quartz:1.0.1'
      
      }
  }
  </code></pre>
  <p>now, when i try to run the app, it says</p>
  <pre><code> [localhost-startStop-1] ERROR  o.c.g.g.w.c.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean '$primaryTransactionManager' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '$primaryTransactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean '$primaryTransactionManager' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '$primaryTransactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_25]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_25]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_25]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean '$primaryTransactionManager' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '$primaryTransactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
      ... 4 common frames omitted
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '$primaryTransactionManager': **Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'**; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
      ... 4 common frames omitted
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
      ... 4 common frames omitted
  Caused by: java.lang.NullPointerException: null
      ... 4 common frames omitted
  </code></pre>
  <p>could you let me know how to resolve this error?</p>