Groovy에서 작은 테스트 응용 프로그램을 코딩하고 있습니다. 다음 코드가 있습니다.groovy 클래스 컴파일시 이상한 스택 트레이스가 발생했습니다.
class Address {
static constraints = {
street(blank:false, maxSize:100)
residencenumber(min:1, max:65000)
addition()
zip()
city(blank:false, maxSize:100)
county()
country(blank:false, maxSize:50)
}
String street
String zip
int residencenumber
String addition
String city
String county
String country
String toString() {
return street + " " + residencenumber + " " + zip + " " + city + " " + country
}
}
나는이 오히려 비밀 메시지를 받고 있어요.
nojevive @의 폴렛 : ~는/dev/코드/mysmallapp의 $의 Grails는 생성 - 모든 주소 에 오신 것을 환영합니다 1.1.1 Grails를 위해 - 2.0 Grails의 집으로 설정되어 아파치 스탠다드 라이센스에 따라 라이센스 http://grails.org/ 를 :/홈/nojevive/dev에 환경이 먼저 개발 groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.call() is applicable for argument types:() values: [] at Project$__clinit__closure1.doCall(Project.groovy:11) at Project$__clinit__closure1.doCall(Project.groovy) at Project.getProperty(Project.groovy) at _PluginDependencies_groovy$_run_closure6_closure53.doCall(_PluginDependencies_groovy:467) at _PluginDependencies_groovy$_run_closure6_closure53.doCall(_PluginDependencies_groovy) at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:274) at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy) at _PluginDependencies_groovy$_run_closure6.doCall(_PluginDependencies_groovy:447) at _GrailsBootstrap_groovy$_run_closure1.doCall(_GrailsBootstrap_groovy:74) at _GrailsGenerate_groovy$_run_closure1.doCall(_GrailsGenerate_groovy:37) at GenerateAll$_run_closure1.doCall(GenerateAll.groovy:42) at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:344) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:334) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.processTargets(Gant.groovy:495) at gant.Gant.processTargets(Gant.groovy:480) Error loading plugin manager: No signature of method: java.lang.Integer.call() is applicable for argument types:() values: []
로 설정 /home/nojevive/dev/grails/scripts/GenerateAll.groovy/홈/nojevive는/dev/코드/mysmallapp 실행 스크립트 내가 생각 :/
가자료 디렉토리 Grails의 어쩌면 내 번호가 범위를 벗어났습니다. 내가 1000000했다). 그렇다면 아마 그 번호가 빌트인 이름이라고 생각해서 residencenumber로 이름을 바꿨을 것입니다. 그러나 운이 없다. 내가 여기서 무엇을 놓치고 있니? 이제 모든 제약 조건을 제거했지만 여전히 동일한 메시지를 제거했습니다. 그래서 그것은 내가 추측하는 분야와 아무런 관련이 없습니다. 무언가가 깨져야합니까?
내가 프로젝트를 정리하고 다시 컴파일. 같은 오류가 발생했습니다. 다른 수업에 오타가 있었나요? 어떻게하면 생성 할 도메인 클래스를 지정해야합니까? 명령 줄에서이 클래스를 모두 작성한 다음 다른 클래스를 컴파일하는 것처럼 보입니까? 어쩌면 초보자 투쟁 ... – nojevive
전 조금 전에 Scott Davis와 Grails 수업을 들었습니다. 내가 수업 중에 배웠던 가장 큰 것 중 하나는 단지 이상한 오류가 발생하면 프로젝트를 깨끗하게 재구성 할 수 없다는 것입니다. 시간의 약 90 %가 동기화되지 않고 다시 컴파일해야했습니다. –