Grails 2.3.0刺激战争错误

时间:2013-09-25 21:34:46

标签: java tomcat grails

我正在测试grails 2.3.0,但是当我创建战争(prod,test,dev)并尝试启动tomcat(7.0.42)时总会遇到此异常:

    2013-09-25 18:23:03,448 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: No signature of method: groovy.xml.streamingmarkupsupport.StreamingMarkupWriter.attributeValue() is applicable for argument types: () values: []
groovy.lang.MissingMethodException: No signature of method: groovy.xml.streamingmarkupsupport.StreamingMarkupWriter.attributeValue() is applicable for argument types: () values: []
    at grails.spring.DynamicElementReader$_invokeMethod_closure1.doCall(DynamicElementReader.groovy:109)
    at grails.spring.DynamicElementReader.invokeMethod(DynamicElementReader.groovy:117)
    at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:756)
    at grails.spring.BeanBuilder.beans(BeanBuilder.java:584)
    at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:527)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)

任何想法?

1 个答案:

答案 0 :(得分:2)

您的grails类路径中可能有多个相同lib的jar版本。尝试删除

rm -Rf ~/.grails

rm -Rf ~/.m2 

grails clean

grails run-app

如果没有成功,请尝试在grails项目jar上运行jarscan以查找重复的类定义。