title: Groovy sql import error. Can not find property even though it's included
body: <p>When trying to run my program from the command line (works in intellij), i receive the following error:</p>
  
  <pre><code>Exception in thread "main" groovy.lang.MissingPropertyException: No such property: Sql for class: com...GetIpUtilization
  at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
  at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
  at com.ibbs.unity.device.GetIpUtilization.run(GetIpUtilization.groovy:48)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
  at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1085)
  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
  at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:901)
  at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:884)
  at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:406)
  at org.codehaus.groovy.runtime.InvokerHelper$runScript.call(Unknown Source)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
  at com...GetIpUtilization.main(GetIpUtilization.groovy)
  </code></pre>
  
  <p>and this is where it says the error is</p>
  
  <pre><code>xbDbConn = Sql.newInstance(
     "jdbc:mysql://"+DATABASE_IP+":"+DATABASE_PORT+"/"+DATABASE_NAME+"?autoReconnect=true",
     DATABASE_USER,
     DATABASE_PASSWORD,
     "com.mysql.jdbc.Driver"
  )
  </code></pre>
  
  <p>I am importing the groovy sql library like so:</p>
  
  <pre><code>import groovy.sql.Sql
  </code></pre>
  
  <p>and I've tried </p>
  
  <pre><code>import groovy.sql.*
  </code></pre>
  
  <p>with no luck. I completely out of ideas at this point. And it's even more frustrating that it works in intellij but not by command line.</p>
  
  <p>udpate</p>
  
  <pre><code># groovy --version
  Groovy Version: 2.2.2 JVM: 1.7.0_51 Vendor: Oracle Corporation OS: Linux
  
  # jdk1.7.0_51/bin/java -jar CnrIpUtilHistory.jar
  
  import com.cisco.cnr.sdk.client.*
  import groovy.sql.*
  import java.sql.SQLException
  import com.cisco.cnr.sdk.*
  import java.lang.*
  
  import org.apache.commons.net.util.SubnetUtils
  
  scriptDir = new File(getClass().protectionDomain.codeSource.location.path).parent
  config = new ConfigSlurper().parse(new File("${scriptDir}/ConfigIpUtilization.groovy").toURL())
  DATABASE_IP = config.mysql.ip
  DATABASE_PORT = config.mysql.port
  DATABASE_NAME = config.mysql.name
  DATABASE_USER = config.mysql.user
  DATABASE_PASSWORD = config.mysql.password
  
  SCOPE_DATABASE_IP = config.scope.ip
  SCOPE_DATABASE_PORT = config.scope.port
  SCOPE_DATABASE_NAME = config.scope.name
  SCOPE_DATABASE_USER = config.scope.user
  SCOPE_DATABASE_PASSWORD = config.scope.password
  
  
  xbDbConn = Sql.newInstance(
     "jdbc:mysql://"+DATABASE_IP+":"+DATABASE_PORT+"/"+DATABASE_NAME+"?autoReconnect=true",
     DATABASE_USER,
     DATABASE_PASSWORD,
     "com.mysql.jdbc.Driver"
  )
  </code></pre>