将grails-2.3.2迁移到2.4.0和JDK 1.7到1.8时出错

时间:2016-12-08 06:51:53

标签: grails migration

我正在从2.3.2迁移grails-2.4.0,从1.7迁移jdk-1.8。

我正在使用this文章进行迁移。

BuildConfig.groovy

dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
        runtime 'org.springframework:spring-test:3.1.0.RELEASE'
    }

plugins {
    // plugins for the build system only
    build ":tomcat:7.0.52.1"

    // Default plugins for the compile step
    compile ":scaffolding:2.1.0"
    compile ':cache:1.1.3'

    // Persistency plugins
    runtime ":hibernate:3.6.10.14"

    // Styling plugins
    runtime ':twitter-bootstrap:3.3.4'
    runtime ":resources:1.2.14"
    runtime ":jquery:1.11.0.2"

    // PDF rendering plugins
    compile ":rendering:1.0.0"

    // Spring security plugins
    compile ":spring-security-core:2.0-RC5"

    // Uncomment these (or add new ones) to enable additional resources capabilities
    runtime ":zipped-resources:1.0.1"
    runtime ":cached-resources:1.1"
    compile ":cache-headers:1.1.7"
}

applicationContext.xml 中删除了grailsResourceLoader web.xml

中删除了sitemesh过滤器详细信息

当我使用grails run-app运行应用程序时,它运行正常。但是当我使用更新时,排序等在此时出现错误。

堆栈跟踪

ERROR org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver  - NullPointerException occurred when processing request: [GET] /wba-web/airline/index - parameters:
mode: 
modeId: 
Stacktrace follows:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <sitemesh:captureContent>: Error executing tag <g:render>: null
    at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:189)
    at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
    at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
    at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:53)
    at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <sitemesh:captureContent>: Error executing tag <g:render>: null
    at airline_index$_run_closure10.doCall(index:26)
    at airline_index.run(index:57)
    ... 8 more
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: null
    at airline_index$_run_closure10_closure16.doCall(index:25)
    ... 10 more
Caused by: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    at grails.util.CacheEntry.getValue(CacheEntry.java:141)
    at grails.util.CacheEntry.getValue(CacheEntry.java:81)
    ... 11 more

我是否会错过要升级的内容?或者这是我的代码中的错误?

快速帮助将非常感谢。!!!

请在此处找到log.txt

3 个答案:

答案 0 :(得分:0)

基于堆栈跟踪,当您点击 / wba-web / airline / index <时,错误是您将 null 值传递给渲染函数/ strong>即可。请复制完整的堆栈跟踪以获取更多信息。

答案 1 :(得分:0)

最新版本的Java存在Grails问题。但是1.8.0_25,1.8.0_31版本支持2.4.0。那些高于1.8.0_40的人可能有问题。

答案 2 :(得分:0)

实际上这是关于过滤器的错误。每次过滤都会阻止我的请求。我在自定义过滤器中进行了一些更改,它确实有用。!