Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails IncompatibleClassChangeError

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?

like image 808
Dennis Thrysøe Avatar asked Aug 18 '10 07:08

Dennis Thrysøe


2 Answers

Run grails clean before you run grails war.

like image 74
Pat Avatar answered Sep 18 '22 23:09

Pat


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.

like image 20
GreenGiant Avatar answered Sep 20 '22 23:09

GreenGiant