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

bug - javac can not navigate to method [pre-release version] #3900

Open
mamilic opened this issue Dec 19, 2024 · 1 comment
Open

bug - javac can not navigate to method [pre-release version] #3900

mamilic opened this issue Dec 19, 2024 · 1 comment

Comments

@mamilic
Copy link

mamilic commented Dec 19, 2024

When trying to navigate to method, or just trying to open methods docs nothing happens, however in logs I can see this error.

Details

[Error - 9:27:19 PM] Request textDocument/codeAction failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.IllegalStateException: java.lang.NoSuchFieldError: Class com.sun.tools.javac.parser.Tokens$Comment$CommentStyle does not have member field 'com.sun.tools.javac.parser.Tokens$Comment$CommentStyle JAVADOC'
	at java.base/java.util.concurrent.CompletableFuture.wrapInCompletionException(CompletableFuture.java:323)
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:359)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:364)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:693)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:527)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1458)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2034)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:189)
Caused by: java.lang.IllegalStateException: java.lang.NoSuchFieldError: Class com.sun.tools.javac.parser.Tokens$Comment$CommentStyle does not have member field 'com.sun.tools.javac.parser.Tokens$Comment$CommentStyle JAVADOC'
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:383)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver.parse(JavacCompilationUnitResolver.java:722)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver.toCompilationUnit(JavacCompilationUnitResolver.java:545)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateASTCached(ASTParser.java:1382)
	at org.eclipse.jdt.core.dom.ASTParser.lambda$1(ASTParser.java:1261)
	at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5694)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1261)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:916)
	at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:184)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:569)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:292)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:278)
	at org.eclipse.jdt.internal.core.CompilationUnit.getCompilationUnitElementInfo(CompilationUnit.java:1613)
	at org.eclipse.jdt.internal.core.CompilationUnit.setOptions(CompilationUnit.java:1581)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:153)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$14(JDTLanguageServer.java:759)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:690)
	... 5 more
Caused by: java.lang.NoSuchFieldError: Class com.sun.tools.javac.parser.Tokens$Comment$CommentStyle does not have member field 'com.sun.tools.javac.parser.Tokens$Comment$CommentStyle JAVADOC'
	at lombok.javac.Javac$JavadocOps_8$1.getStyle(Javac.java:364)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.scan(UnusedTreeScanner.java:82)
	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:95)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:110)
	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:118)
	at jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:202)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.visitClass(UnusedTreeScanner.java:112)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver$3$1.visitClass(JavacCompilationUnitResolver.java:597)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver$3$1.visitClass(JavacCompilationUnitResolver.java:583)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:896)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:91)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.scan(UnusedTreeScanner.java:87)
	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:95)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:110)
	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:118)
	at jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:202)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.visitClass(UnusedTreeScanner.java:112)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver$3$1.visitClass(JavacCompilationUnitResolver.java:597)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver$3$1.visitClass(JavacCompilationUnitResolver.java:583)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:896)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:91)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.scan(UnusedTreeScanner.java:87)
	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:95)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:110)
	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:118)
	at jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:202)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.visitClass(UnusedTreeScanner.java:112)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver$3$1.visitClass(JavacCompilationUnitResolver.java:597)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver$3$1.visitClass(JavacCompilationUnitResolver.java:583)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:896)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:91)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.scan(UnusedTreeScanner.java:87)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:110)
	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:118)
	at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:151)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.visitCompilationUnit(UnusedTreeScanner.java:93)
	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:625)
	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:91)
	at org.eclipse.jdt.internal.javac.UnusedTreeScanner.scan(UnusedTreeScanner.java:87)
	at org.eclipse.jdt.core.dom.JavacCompilationUnitResolver$3.finished(JavacCompilationUnitResolver.java:608)
	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:133)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1432)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1379)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:404)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$analyze$1(JavacTaskImpl.java:379)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:379)
	... 23 more


@snjeza
Copy link
Contributor

snjeza commented Dec 19, 2024

@mamilic Could you attach a project reproducing the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants