Grails IncompatibleClassChangeError

I am using the war made with the Grail War on the pier server.

As far as I can tell, Grails builds with Sun JDK 1.6.0_17-b04 and runs on Sun JDK 1.6.0.16 (like 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 on?

+5
source share
3 answers

Run grails cleanbefore starting grails war.

+11
source

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

More information can be found here .

+3

You are probably facing a JAR conflict. Namely, your build environment uses a single jar, and the Jetty uses a conflicting jar. This often happened with various XML parsing stacks.

Try to look at the banks used by the pier, and compare them with those in your project.

0
source

All Articles