6

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?

Dennis Thrysøe
  • 1,791
  • 4
  • 19
  • 31

3 Answers3

11

Run grails clean before you run grails war.

Pat
  • 2,228
  • 3
  • 24
  • 33
3

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.

Community
  • 1
  • 1
GreenGiant
  • 4,930
  • 1
  • 46
  • 76
0

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.

Bob Herrmann
  • 9,458
  • 10
  • 38
  • 45