I have a grails application with a JavaCC parser integrated. In this parser I create grails domain object. I have objects such as Product, Release and Document as Grails domain classes.
In the generated Java class (from JavaCC) I create Products, Releases and Documents. Very often (not always though) I get build errors from Grails stating that:
Compile error during compilation with javac.
D:\workspaces\productArchive\com.rcs.products\src\java\com\configinfo\Parser.java:173: error: cannot find symbol
document.setFilename(filename);
^
symbol: method setFilename(String)
location: variable document of type Document
My Document class looks like this:
class Document {
String filename
String docVersion
String path
String title
String documentNumber
String keys
static belongsTo = [release: Release]
static constraints = {
filename(blank: false)
version(blank: false)
path(blank: true)
release(nullable: true)
keys(blank: true, nullable: true)
}
}
I have set JDK_VERSION to 1.6 in the JavaCC grammar file. I'm using Grails 2.0.1.
Can anyone explain these compiler errors?
It seemed to some kind of name collison. I don't know why though.