簡體   English   中英

Eclipse項目Grails / Groovy中的錯誤

[英]Error in eclipse project grails/groovy

在Eclipse中使用Grails項目時出現以下錯誤

在以下過程中發生內部錯誤:“從選擇中請求Java AST”。 org.codehaus.groovy.eclipse.core.compiler.GroovySnippetCompiler。(Lorg / codehaus / groovy / eclipse / core / model / GroovyProjectFacade;)V

有人有同樣的問題嗎?

如何解決問題?

更新

該問題已在Groovy Eclipse 2.9.3的最新Snapshot版本中修復,因此您現在可以按照指南@ https://technology.first8.nl/eclipse-neon-grails-2-x-with-groovy-and- gsp-support /

先前的答案

我還偶然發現了此錯誤,它僅在grails-artefacts(服務,控制器等)的類中發生。 它似乎與grails-eclipse插件2.9.2的最新更改有關。 2017年6月的一個版本沒有任何問題,最近從2018年1月升級到2.9.2版本提出了此問題。

我使用GGTS更新站點zip( http://download.springsource.com/release/TOOLS/update/3.6.4.RELEASE/e4中包含的2015年groovy-eclipse 2.9.2版本修復了該問題.5 / springsource-tool-suite-3.6.4.RELEASE-e4.5-updatesite.zip )。

我要尋找的(沒有成功的)是groovy-eclipse 2.9.2分支的發行版本的存檔。 這樣,我至少可以選擇從2017年6月開始安裝可運行的2.9.2版本。如果有人知道在哪里可以找到較舊的版本,我很樂意提供提示!

最初提到的Exception的stacktrace如下所示:

java.lang.NoSuchMethodError: org.codehaus.groovy.eclipse.core.compiler.GroovySnippetCompiler.<init>(Lorg/codehaus/groovy/eclipse/core/model/GroovyProjectFacade;)V
    at org.grails.ide.eclipse.editor.groovy.types.PerProjectTypeCache.setProject(PerProjectTypeCache.java:107)
    at org.grails.ide.eclipse.core.internal.plugins.GrailsCore$PerProjectCacheManager.get(GrailsCore.java:54)
    at org.grails.ide.eclipse.core.internal.plugins.GrailsCore.connect(GrailsCore.java:199)
    at org.grails.ide.eclipse.editor.groovy.elements.GrailsProject.findAllServices(GrailsProject.java:510)
    at org.grails.ide.eclipse.editor.groovy.types.PerProjectServiceCache.ensureInitialized(PerProjectServiceCache.java:108)
    at org.grails.ide.eclipse.editor.groovy.types.PerProjectServiceCache.findServicesFor(PerProjectServiceCache.java:93)
    at org.grails.ide.eclipse.editor.groovy.elements.AbstractGrailsElement.populateInjectedServices(AbstractGrailsElement.java:148)
    at org.grails.ide.eclipse.editor.groovy.elements.ControllerClass.initializeTypeLookup(ControllerClass.java:284)
    at org.grails.ide.eclipse.editor.groovy.types.GrailsTypeLookup.initialize(GrailsTypeLookup.java:100)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitCompilationUnit(TypeInferencingVisitorWithRequestor.java:347)
    at org.codehaus.groovy.eclipse.codebrowsing.requestor.CodeSelectHelper.selectASTNode(CodeSelectHelper.java:126)
    at org.codehaus.groovy.eclipse.search.GroovyOccurrencesFinder.initialize(GroovyOccurrencesFinder.java:181)
    at org.codehaus.groovy.eclipse.search.GroovyOccurrencesFinder.findOccurrences(GroovyOccurrencesFinder.java:209)
    at org.codehaus.groovy.eclipse.editor.GroovyEditor.updateOccurrenceAnnotations(GroovyEditor.java:1317)
    at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$6.selectionChanged(JavaEditor.java:3380)
    at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:178)
    at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM