Archive for ‘Grails’

February 26, 2011

java.lang.ClassFormatError: Truncated class file

by Jay Jonas

For future reference in case others encounter same
problem when running grails run-app command.  To confirm the problem try this:

$ export JAVA_OPTS="-Xverify:none"
$ grails run-app

For this case, you will see this error message:

Error executing script RunApp: Incompatible magic value <magic_number>  in class file  RunApp_groovy
java.lang.ClassFormatError: Incompatible magic value <magic_number> in class file RunApp_groovy

To fix it, delete the .grails folder in your home directory:

rm -rf $HOME/.grails

That’s it!