无法编译Grails项目

时间:2016-03-14 19:27:42

标签: grails ggts

我是Grails的新手,所以我为问一些太容易的事而道歉:

我尝试做项目> 清洁,我得到:

Welcome to Grails 1.3.7 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /Users/shamoon/.sdkman/candidates/grails/1.3.7/
Base Directory: /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer
Resolving dependencies...
Dependencies resolved in 1363ms.
Running script /Users/shamoon/.sdkman/candidates/grails/1.3.7/scripts/RunApp.groovy
Environment set to development
     [copy] Copied 4 empty directories to 2 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 13 empty directories to 9 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 2 empty directories to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 5 empty directories to 2 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 3 empty directories to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 3 empty directories to 2 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 2 empty directories to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 6 empty directories to 5 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 1 empty directory to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copying 1 file to /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 6 empty directories to 2 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 1 empty directory to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 4 empty directories to 4 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 2 empty directories to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 2 empty directories to 2 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 1 empty directory to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 3 empty directories to 2 empty directories under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
     [copy] Copied 1 empty directory to 1 empty directory under /Users/shamoon/.grails/1.3.7/projects/MySiteServer/resources
  [groovyc] Compiling 1 source file to /Users/shamoon/.grails/1.3.7/projects/MySiteServer/plugin-classes
  [groovyc] Compiling 258 source files to /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/target/classes
  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] Compile error during compilation with javac.
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Item.java:51: error: cannot find symbol
  [groovyc] protected  ItemType getItemType() { return (ItemType)null;}
  [groovyc]            ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class Item
  [groovyc] /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/src/java/iq4/model/QueryResult.java:7: error: cannot find symbol
  [groovyc]     ItemType itemType;
  [groovyc]     ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class QueryResult<T>
  [groovyc]   where T is a type-variable:
  [groovyc]     T extends Object declared in class QueryResult
  [groovyc] /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/src/java/iq4/model/QueryResult.java:8: error: cannot find symbol
  [groovyc]     ItemType rowType;
  [groovyc]     ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class QueryResult<T>
  [groovyc]   where T is a type-variable:
  [groovyc]     T extends Object declared in class QueryResult
  [groovyc] /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/src/java/iq4/model/QueryResult.java:68: error: cannot find symbol
  [groovyc]     public ItemType getItemType() {
  [groovyc]            ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class QueryResult<T>
  [groovyc]   where T is a type-variable:
  [groovyc]     T extends Object declared in class QueryResult
  [groovyc] /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/src/java/iq4/model/QueryResult.java:72: error: cannot find symbol
  [groovyc]     public void setItemType(ItemType itemType) {
  [groovyc]                             ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class QueryResult<T>
  [groovyc]   where T is a type-variable:
  [groovyc]     T extends Object declared in class QueryResult
  [groovyc] /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/src/java/iq4/model/QueryResult.java:76: error: cannot find symbol
  [groovyc]     public ItemType getRowType() {
  [groovyc]            ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class QueryResult<T>
  [groovyc]   where T is a type-variable:
  [groovyc]     T extends Object declared in class QueryResult
  [groovyc] /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/src/java/iq4/model/QueryResult.java:80: error: cannot find symbol
  [groovyc]     public void setRowType(ItemType rowType) {
  [groovyc]                            ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class QueryResult<T>
  [groovyc]   where T is a type-variable:
  [groovyc]     T extends Object declared in class QueryResult
  [groovyc] /Users/shamoon/GoogleDrive/Sites/MySite/MySite/MySiteServer/src/java/iq4/servlet/AWSBridgeServlet.java:3: error: cannot find symbol
  [groovyc] import iq4.model.ItemType;
  [groovyc]                 ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: package iq4.model
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Task.java:31: error: cannot find symbol
  [groovyc] public  PriorityType getPriority() { return (PriorityType)null;}
  [groovyc]         ^
  [groovyc]   symbol:   class PriorityType
  [groovyc]   location: class Task
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Task.java:32: error: cannot find symbol
  [groovyc] public  void setPriority(PriorityType value) { }
  [groovyc]                          ^
  [groovyc]   symbol:   class PriorityType
  [groovyc]   location: class Task
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Task.java:33: error: cannot find symbol
  [groovyc] public  TaskStatusType getStatus() { return (TaskStatusType)null;}
  [groovyc]         ^
  [groovyc]   symbol:   class TaskStatusType
  [groovyc]   location: class Task
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Task.java:34: error: cannot find symbol
  [groovyc] public  void setStatus(TaskStatusType value) { }
  [groovyc]                        ^
  [groovyc]   symbol:   class TaskStatusType
  [groovyc]   location: class Task
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Task.java:43: error: cannot find symbol
  [groovyc] protected  ItemType getItemType() { return (ItemType)null;}
  [groovyc]            ^
  [groovyc]   symbol:   class ItemType
  [groovyc]   location: class Task
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Job.java:36: error: cannot find symbol
  [groovyc] public  WorkHours getWorkHours() { return (WorkHours)null;}
  [groovyc]         ^
  [groovyc]   symbol:   class WorkHours
  [groovyc]   location: class Job
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Job.java:37: error: cannot find symbol
  [groovyc] public  void setWorkHours(WorkHours value) { }
  [groovyc]                           ^
  [groovyc]   symbol:   class WorkHours
  [groovyc]   location: class Job
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Job.java:38: error: cannot find symbol
  [groovyc] public  Internship getInternship() { return (Internship)null;}
  [groovyc]         ^
  [groovyc]   symbol:   class Internship
  [groovyc]   location: class Job
  [groovyc] /var/folders/t2/czsgnnwx4ys_86hfq04m822r0000gn/T/groovy-generated-3051460305321062736-java-source/iq4/model/Job.java:39: error: cannot find symbol
  [groovyc] public  void setInternship(Internship value) { }

  ....

  [groovyc] Note: Some input files use unchecked or unsafe operations.
  [groovyc] Note: Recompile with -Xlint:unchecked for details.
  [groovyc] 32 errors
  [groovyc] 1 error
Compilation error: Compilation Failed

我的同事可以在她的机器上运行并运行。我们都使用相同版本的Java,Grails和GGTS。我该怎么办?

2 个答案:

答案 0 :(得分:1)

Grails 1.3.7是一个非常古老的版本。我建议您使用实际支持的版本

答案 1 :(得分:1)

编译器找不到这些函数中返回的'java'文件。使用“public”访问说明符检查它是否在适当的文件夹中。如果是在谷歌驱动器中检查它是否可访问。如果您的同事在她的系统上启动并运行此应用程序,则可能是因为java源文件无法访问。检查并提供更多信息