The Grails documentation defines a "count" static method, defined in the documentation like this:
Description Counts the number of instances in the database and returns the result Parameters None Example def noOfBooks = Book.count()
However, whenever I call it, I get this error! I simple added a call to the name of my Domain Class (Company) like this to a working Controller
def companies = Company.count()
and when it exectutes that line, it blows up with the following error
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
Other, working, code in the controller (pre-generated with the static scaffolding commands) access Company.get(...) etc, with no error
What am I doing wrong?