groovygroovy-grape

Why am I getting "method without body" error when using Groovy Grape?


Below is a code snippet and below that is the error. Am I doing something wrong that's obvious? I'm very new to Grapes.

   @Grab('com.microsoft:ms-sql-server-jdbc-dependencies')
    GrabConfig(systemClassLoader=true)
    import groovy.sql.Sql

    println "Hello World"

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: cfwdUpdate.groovy: 1: You defined a method without body. Try adding a body, or d eclare it abstract.

at line: 1 column: 1


Solution

  • You missed the @ off

    @GrabConfig(systemClassLoader=true)