升级到Grails 2.4.1后没有这样的方法

时间:2014-06-21 06:07:29

标签: grails

我刚升级到Grails 2.4.1,似乎tag libraries出现了问题。

Class java.lang.NoSuchMethodError
Message org.codehaus.groovy.grails.plugins.web.api.TagLibraryApi.getOut(Ljava/lang/Object;)Ljava/io/Writer;

这是堆栈跟踪:

org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <asset:javascript>: org.codehaus.groovy.grails.plugins.web.api.TagLibraryApi.getOut(Ljava/lang/Object;)Ljava/io/Writer;
... 8 more
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <asset:javascript>: org.codehaus.groovy.grails.plugins.web.api.TagLibraryApi.getOut(Ljava/lang/Object;)Ljava/io/Writer;
at home_saw303_dev_projects_zsc_supporter_grails_app_views_layouts_zscsupporter_gsp$_run_closure1.doCall(home_saw303_dev_projects_zsc_supporter_grails_app_views_layouts_zscsupporter_gsp:36)
at home_saw303_dev_projects_zsc_supporter_grails_app_views_layouts_zscsupporter_gsp.run(home_saw303_dev_projects_zsc_supporter_grails_app_views_layouts_zscsupporter_gsp:43)
... 8 more
Caused by: java.lang.NoSuchMethodError: org.codehaus.groovy.grails.plugins.web.api.TagLibraryApi.getOut(Ljava/lang/Object;)Ljava/io/Writer;
at asset.pipeline.AssetsTagLib$_closure1_closure10.doCall(AssetsTagLib.groovy:45)
at asset.pipeline.AssetsTagLib$_closure1.doCall(AssetsTagLib.groovy:43)
... 10 more

你能证实这种行为吗?有解决方法吗?

1 个答案:

答案 0 :(得分:15)

我认为升级后原始应用中的grails clean会使问题消失。问题是你有一个用早期版本的Grails编译的GSP,而且编译的类与你现在使用的Grails版本不兼容。