title: Error when deploying Grails app: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8
body: <p>So I have a Grails app running in STS on my local machine, and I'm trying to deploy it to a CentOS/Tomcat server VM.  I think I installed Groovy and Grails correctly, or at least I can run them from the console now, by adding them to the path in /etc/bashrc.  However, when I take my compiled .war file, and put it in the Tomcat server's webapp directory and restart the server, it throws this error:</p>
  
  <pre><code>Oct 17, 2011 4:33:21 PM org.apache.catalina.startup.HostConfig deployWAR
  INFO: Deploying web application archive CSTools-0.1.war
  2011-10-17 16:33:29,558 [main] ERROR context.ContextLoader  - Context initialization failed
  org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8
      at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:87)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
      at org.apache.catalina.core.StandardService.start(StandardService.java:525)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
  Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8
      at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:723)
      at grails.spring.BeanBuilder.beans(BeanBuilder.java:573)
      at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:519)
  Caused by: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8
      at IbatisGrailsPlugin$_closure1_closure3.doCall(IbatisGrailsPlugin.groovy:48)
      at grails.spring.BeanBuilder.invokeBeanDefiningMethod(BeanBuilder.java:679)
      at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:550)
      at IbatisGrailsPlugin$_closure1.doCall(IbatisGrailsPlugin.groovy:46)
      at IbatisGrailsPlugin$_closure1.doCall(IbatisGrailsPlugin.groovy)
      ... 3 more
  Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.BytecodeInterface8
      ... 8 more
  </code></pre>
  
  <p>Any suggestions here?  I can't seem to find anything online that might help with this error.  So far as I can tell, the JVM is the same (aside from OS X/Linux versions), as are the versions of Grails and Groovy.</p>