0

我正在测试 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)

有任何想法吗?

4

1 回答 1

2

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

rm -Rf ~/.grails

rm -Rf ~/.m2 

grails clean

grails run-app

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

于 2013-09-26T07:25:29.453 回答