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!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: