Strangely I am not having any compile-time error but while running the application I am getting NoClassDefFound error for Groovy classes.
I am using Eclipse 3.6 with Groovy 2.7.0 plugin. I have Groovy 1.8.5 installed on my machine and groovy-all.jar is in my classpath of application.
I can see all the groovy files in WEB-INF/classes folder with .groovy extension not with .class extension.
What I am missing here?
Two possibilities:
You project is not a groovy project and so your groovy files are being treated as resources (not sources). Resources are copied to the output folder, whereas sources are compiled. Make sure that your project icon has a little GR symbol on it.
Or perhaps you have inadvertently enabled script folders for the source folder where your groovy files are located. Go to Preferences -> Groovy -> Compiler and look at the section on Groovy Script Folders. Note that Groovy Script folders can also be configured on a per-project basis, so you may also need to look at Project -> Properties -> Groovy Compiler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With