Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.0-beta-3
-
None
-
None
-
CVS as of 2004-01-06, Tomcat 4.1.24
Description
This exception occurs in the groovlet that follows:
groovy.lang.MissingMethodException: No such method: queryEach for class: sql
at groovy.lang.MetaClass.invokeStaticMethod(MetaClass.java:285)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:120)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:92)
at sql.run(sql.groovy:10)
at groovy.servlet.GroovyServlet.service(GroovyServlet.java:233)
---------- sql.groovy -----------------
import javax.naming.InitialContext
import javax.sql.DataSource
import groovy.sql.Sql
Context ctx = new InitialContext();
DataSource dataSource = ctx.lookup("java:comp/env/jdbc/kolc")
sql = new Sql(dataSource)
System.out.println("Sql instance: ${sql}")
sql.queryEach("select * from WebContentPageType")
{
out.println("key: ${it.pageNameKey}<BR>")
}