开发者

Grails IncompatibleClassChangeError

开发者_Python百科

I deploy a war made with "grails war" to a jetty server.

As far as I can determine, Grails builds with Sun JDK 1.6.0_17-b04 and jetty runs on Sun JDK 1.6.0.16 (both on linux).

2010-08-18 07:33:47.018:WARN::Nested in org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus.groovy.runtime.InvokerInvocationException:     
java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.ClassLoader do not match. Expected 3 but got 2:
java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.ClassLoader do not match. Expected 3 but got 2
at grails.plugin.scopedproxy.AlwaysReloadableSmartClassLoader.<init>(AlwaysReloadableSmartClassLoader.groovy:28)
at grails.plugin.scopedproxy.ScopedProxyUtils.wrapInSmartClassLoader(ScopedProxyUtils.groovy:154)

How can this problem be solved or debugged further?


Run grails clean before you run grails war.


According to another post, Groovy code that uses exceptions that was compiled with a version of Java prior to 7 is not compatible with Java 7.

More information can be found here.


You are probably running into a JAR conflict. Namely your build environment is using one jar, and runtime (Jetty) is using a conflicting jar. This used to often happen with various XML parsing stacks.

Try looking at the Jars used by jetty and compare them to the ones in your project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜