使用grails渲染插件0.44的IncompatibleClassChangeError

时间:2014-03-20 02:18:14

标签: grails plugins pdf-rendering

我有渲染插件0.44的grails 2.0.4应用程序。它在开发环境中工作正常,但是在使用IncompatibleClassChangeError生成失败。

查看罐子,看是否有任何重复或不兼容,无法追踪任何可疑的东西。 尝试清洁战争(grails clean,war),但没有帮助。

除了java次要版本 - java 1.6.0_65(dev test / mac os)和java 1.6.0_30(production / cent os)之外,生产和开发测试都运行类似的设置。

非常感谢任何帮助,谢谢!

这是我的BuildConfig.groovy:

plugins{

------

compile ":qrcode:0.3"
compile ":rendering:0.4.4"
}

这是堆栈跟踪:

    org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [our function] of controller [com.x.ourcontroller]  caused exception: Runtime error executing action
        at org.grails.jaxrs.web.JaxrsFilter.doFilterInternal(JaxrsFilter.java:46)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Runtime error executing action
        ... 7 more
Caused by: java.lang.reflect.InvocationTargetException
        ... 7 more
Caused by: java.lang.IncompatibleClassChangeError
        at grails.plugin.rendering.document.RenderEnvironment.init(RenderEnvironment.groovy:37)
        at grails.plugin.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:75)
        at grails.plugin.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:67)
        at grails.plugin.rendering.document.XhtmlDocumentService.generateXhtml(XhtmlDocumentService.groovy:64)
        at grails.plugin.rendering.document.XhtmlDocumentService.createDocument(XhtmlDocumentService.groovy:34)
        at grails.plugin.rendering.RenderingService.render(RenderingService.groovy:36)
        at grails.plugin.rendering.RenderingService.render(RenderingService.groovy:35)
        at grails.plugin.rendering.RenderingService.render(RenderingService.groovy:65)
        at RenderingGrailsPlugin$_closure3.doCall(RenderingGrailsPlugin.groovy:59)
        at com.xx.yy..
        ... 7 more
2014-03-19 20:55:52,025 [TP-Processor16] ERROR servlet.GrailsDispatcherServlet  - HandlerInterceptor.afterCompletion threw exception
java.lang.IncompatibleClassChangeError
        at org.grails.jaxrs.web.JaxrsFilter.doFilterInternal(JaxrsFilter.java:46)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at java.lang.Thread.run(Thread.java:701)
2014-03-19 20:55:52,026 [TP-Processor16] ERROR servlet.GrailsDispatcherServlet  - HandlerInterceptor.afterCompletion threw exception
java.lang.IncompatibleClassChangeError
        at org.grails.jaxrs.web.JaxrsFilter.doFilterInternal(JaxrsFilter.java:46)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)        at java.lang.Thread.run(Thread.java:701)

1 个答案:

答案 0 :(得分:0)

java.lang.IncompatibleClassChangeError是由于针对jax-rs插件的MockHttpServletRequest和MockHttpServletResponse类的不同插件之间的类之间发生冲突而发生的。尝试了最新的jax-rs插件(2.0.x grails的0.9),在发行说明中提到这些被删除。但是,这个版本的插件并没有解决问题。从战争中手动删除jax-rs插件下的模拟目录,并将其重新打包为现在的解决方法。删除mock / *文件修复了问题。