2009-12-02 2 views
0

최근에 내 컴퓨터 구성을 수정 한 것 같지 않지만 갑자기 'grails clean'을 수행 한 후 'grails war' "java.lang.UnsupportedClassVersionError"로 인해 프로젝트를 빌드 할 수 없습니다. 나는이 부분을 자바/부품 그루비 클래스와 그들이 그루비 1.6.5을 사용하여 컴파일 일부 항아리를Grails war 명령으로 java.lang.UnsupportedClassVersionError가 발생했습니다

Welcome to Grails 1.1.1 - http://grails.org/ 
Licensed under Apache Standard License 2.0 
Grails home is set to: /usr/local/grails-1.1.1 

Base Directory: /Users/Robin/code/ 
Running script /usr/local/grails-1.1.1/scripts/War.groovy 
Environment set to production 
Warning, target causing name overwriting of name startLogging 
    [copy] Copied 6 empty directories to 3 empty directories 
under /Users/robin/.grails/1.1.1/projects/wf/resources 
    [mkdir] Created dir: /Users/Robin/code/web-app/plugins/ui-performance-1.2.1 
    [copy] Copying 1 file to /Users/Robin/code/web-app/plugins/ui-performance-1.2.1 
    [mkdir] Created dir: /Users/robin/.grails/1.1.1/projects/wf/classes 
    [groovyc] Compiling 14 source files to /Users/robin/.grails/1.1.1/projects/wf/classes 
    [groovyc] Compiling 262 source files to /Users/robin/.grails/1.1.1/projects/wf/classes 
Compilation error: java.lang.UnsupportedClassVersionError: Bad version number in .class file 

: 나는 'Grails의 전쟁'을 실행할 때

JDK: 1.5.0_19 on MacOS 10.6 
Grails: 1.1.1 
Groovy: 1.6.5 

는 여기에 내가 무엇을 얻을.

어디에서이 문제의 원인을 찾아야합니까? Grails 1.1 이전에는 프레임 워크와 관련하여 많은 문제가 있었음을 기억하지 못합니다.

+0

MacOS X 10.6에는 JDK 1.5가 없거나 지원하지 않기 때문에 문제가 생길 수 있습니다 (직접 추가 할 수 있습니다 ...) – tegbains

답변

1

AFAIK, Grails 1.1.1은 JDK 6.x 기능에 의존하지 않으며 1.5 호환성을 가지고 컴파일됩니다. 타겟 JDK 6.x로 컴파일 된 플러그인이 하나 이상 설치되어 있다고 가정합니다.

가장 간단한 해결책은 JDK 6.x를 설치하고 모든 Grails 관련 작업을 수행하는 것입니다. 어떤 이유로 든 이것이 가능하지 않은 경우 http://mindprod.com/products1.html#JARCHECK을 사용하여 "나쁜 사람"을 식별 할 수 있습니다 (예 : esp). ~/.grails/1.1.1/projects/wf/plugins에 있습니다. 그런 다음 svn을 사용하여 "bad guy"플러그인 소스를 체크 아웃하고 JDK 1.5로 직접 컴파일하십시오.

+0

이 도구를 지적 해 주셔서 감사합니다. 그것은 절대적으로 환상적입니다! (JDK 1.5와 함께 있어야 함) –

관련 문제