2012-02-20 39 views
0

我有一個集成了JavaCC解析器的grails應用程序。在這個解析器中,我創建了grails域對象。我有諸如Product,Release和Document等對象作爲Grails領域類。grails應用程序中的Java編譯器錯誤

在生成的Java類(來自JavaCC)中,我創建了產品,版本和文檔。很多時候(並不總是雖然)我得到修建從Grails的錯誤,指出:

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

我的文檔類看起來是這樣的:

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) 
    } 

} 

我在JavaCC的語法文件中設置JDK_VERSION 1.6 。我正在使用Grails 2.0.1。

任何人都可以解釋這些編譯器錯誤嗎?

回答

0

這似乎是某種名稱科裏森的。我不知道爲什麼。

0

我認爲把文檔類到包和嘗試重命名

String filename 

String nameOfFile