Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace search breaks when running on openjdk-10 #582

Closed
papegaaij opened this issue May 1, 2018 · 5 comments
Closed

Workspace search breaks when running on openjdk-10 #582

papegaaij opened this issue May 1, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@papegaaij
Copy link

Any java Search in Eclipse fails when eclipse is running on openjdk-10 with the stacktrace below. I'm running Eclipse 4.7.3a with groovy-eclipse 3.0.0.xx-201804302107-e47.

java.lang.NoClassDefFoundError: Unable to load class org.codehaus.groovy.runtime.DateGroovyMethods due to missing dependency java/sql/Date
    at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:429)
    at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:360)
    at org.codehaus.groovy.ast.ClassNode.getDeclaredMethods(ClassNode.java:972)
    at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:987)
    at org.eclipse.jdt.groovy.search.CategoryTypeLookup.lookupType(CategoryTypeLookup.java:56)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.lookupExpressionType(TypeInferencingVisitorWithRequestor.java:2476)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.handleSimpleExpression(TypeInferencingVisitorWithRequestor.java:1992)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitConstantExpression(TypeInferencingVisitorWithRequestor.java:1127)
    at org.codehaus.groovy.ast.expr.ConstantExpression.visit(ConstantExpression.java:85)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitPropertyExpression(TypeInferencingVisitorWithRequestor.java:1663)
    at org.codehaus.groovy.ast.expr.PropertyExpression.visit(PropertyExpression.java:57)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitListOfExpressions(CodeVisitorSupport.java:328)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitListExpression(CodeVisitorSupport.java:236)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitListExpression(TypeInferencingVisitorWithRequestor.java:1411)
    at org.codehaus.groovy.ast.expr.ListExpression.visit(ListExpression.java:64)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitAnnotation(ClassCodeVisitorSupport.java:118)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitAnnotation(TypeInferencingVisitorWithRequestor.java:819)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitAnnotations(ClassCodeVisitorSupport.java:112)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitAnnotations(ClassCodeVisitorSupport.java:97)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitConstructorOrMethod(TypeInferencingVisitorWithRequestor.java:1212)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:520)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:393)
    at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitCompilationUnit(TypeInferencingVisitorWithRequestor.java:357)
    at org.codehaus.jdt.groovy.integration.internal.GroovyLanguageSupport.maybePerformDelegatedSearch(GroovyLanguageSupport.java:236)
    at org.codehaus.jdt.groovy.integration.LanguageSupportFactory.maybePerformDelegatedSearch(LanguageSupportFactory.java:114)
    at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1267)
    at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1389)
    at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1521)
    at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:122)
    at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:236)
    at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:583)
    at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:608)
    at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:175)
    at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
eclipse.buildId=4.7.3.M20180330-0640
java.version=10.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -data file:/home/papegaaij/workspaces-4.6/fabric/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
@eric-milles
Copy link
Member

GroovyClassLoader used does not yet support modulepath entries. For reference, here is the translation of project's classpath and modulepath to class loaders: https://github.com/groovy/groovy-eclipse/blob/master/base/org.eclipse.jdt.groovy.core/src/org/codehaus/jdt/groovy/internal/compiler/GroovyClassLoaderFactory.java

@chrylis
Copy link

chrylis commented May 11, 2018

I'm having the same problem on JDK 9. Is there any workaround?

@eric-milles
Copy link
Member

The workaround is to use Java 8 for the Eclipse runtime. You will still be able to develop project's that target Java 9+.

@eric-milles
Copy link
Member

This should be resolved now. Could you please retest with the latest snapshot?

@papegaaij
Copy link
Author

Running on Eclipse Photon 4.8.0 with Groovy Eclipse 3.0.0.xx-201807031944-e48 on openjdk-10.0.1 I can confirm I no longer get the stacktrace.

@eric-milles eric-milles added the bug label Jul 6, 2018
@eric-milles eric-milles self-assigned this Jul 6, 2018
@eric-milles eric-milles added this to the v3.0.0 milestone Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants