title: Groovy / Postgres "No signature of method: java.lang.String.positive()"
body: <p>Trying to write some basic PostgreSQL code using JDBC to eventually integrate into an application written in Groovy. I have written this Groovy code to connect to the DB and then execute statements; but, I'm getting an error that I have tried to find a solution to, and could not. Here is the relevant part of the Groovy code, along with a comment as to where the error appears to be happening:</p>
  
  <pre><code>def sql = Sql.newInstance(dbUrl, dbUser, dbPassword, dbDriver)
  
  println "Sql Instance: " + sql
  
  sql.execute(
          " DROP TABLE IF EXISTS test;"
          + "CREATE TABLE test ("
              + "id SERIAL,"
              + "word TEXT,"
              + "number INTEGER,"
              + "decimal NUMERIC,"
              + "datetime TIMESTAMP"
              + ");"
   )
  
  def params = ['Hello, World!', 42, 3.14159, null]
  
  sql.execute("INSERT INTO test (word, number, decimal, datetime)"
              + "VALUES (?,?,?,?);", params)
  
  sql.eachRow("SELECT * FROM test;") { row -&gt;
      println "The row Id is: ${row.id}"
          // HERE??
          + "The word is: ${row.word}"
          + "The number is: ${row.number}"
          + "The decimal is: ${row.decimal}"
          + "The date-time is: ${row.datetime}"
  }
  sql.close()
  </code></pre>
  
  <p>The console log says:</p>
  
  <blockquote><pre>
      Sql Instance: groovy.sql.Sql@5aa9e4eb
      The row Id is: 1
      Caught: groovy.lang.MissingMethodException: No signature of method: java.lang.String.positive() is applicable for argument types: () values: []
      Possible solutions: notify(), tokenize(), size(), size()
      groovy.lang.MissingMethodException: No signature of method: java.lang.String.positive() is applicable for argument types: () values: []
      Possible solutions: notify(), tokenize(), size(), size()
          at DatabaseTest$_run_closure1.doCall(DatabaseTest.groovy:34)
          at DatabaseTest.run(DatabaseTest.groovy:31)
          at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
  
      Process finished with exit code 1</pre></blockquote>
  
  <p>Any idea what I'm doing wrong?</p>