Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
12.4
-
None
-
None
-
Java 11.0.11 on Windows 10 on NetBeans 12.4 with vanilla javac (nb-javac not installed)
Description
Working with Compile-on-Save enabled on a Maven-based NetBeans Platform project, with vanilla javac (nb-javac not installed), I frequently get the following stack trace:
java.lang.NoSuchMethodException: com.sun.tools.javac.comp.Enter.unenter(com.sun.tools.javac.tree.JCTree$JCCompilationUnit, com.sun.tools.javac.tree.JCTree) at java.base/java.lang.Class.getDeclaredMethod(Class.java:2475) at org.netbeans.api.java.source.TreeUtilities.unenter(TreeUtilities.java:927) at org.netbeans.api.java.source.TreeUtilities.attributeTree(TreeUtilities.java:916) at org.netbeans.api.java.source.TreeUtilities.attributeTree(TreeUtilities.java:845) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:502) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:477) at org.netbeans.modules.java.source.parsing.MimeTask.run(MimeTask.java:60) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586) at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:357) at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:340) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335) at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67) at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:311) at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:431) at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.resolve(DeclarativeHintsParser.java:477) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.access$000(DeclarativeHintsParser.java:83) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseCondition(DeclarativeHintsParser.java:311) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseConditions(DeclarativeHintsParser.java:258) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseRule(DeclarativeHintsParser.java:215) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseInput(DeclarativeHintsParser.java:184) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.access$200(DeclarativeHintsParser.java:90) at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.parse(DeclarativeHintsParser.java:395) at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHints(DeclarativeHintRegistry.java:263) at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHintFile(DeclarativeHintRegistry.java:239) at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.readHints(DeclarativeHintRegistry.java:128) at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.computeHints(DeclarativeHintRegistry.java:111) at org.netbeans.modules.java.hints.spiimpl.RulesManagerImpl.readHints(RulesManagerImpl.java:139) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:133) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:128) at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:114) at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:65) at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273) at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561) at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Since Compile-on-Save with vanilla javac is a recently introduced feature, it's probably good to get each one of these issues reported and fixed.
The relevant code here was introduced in https://github.com/apache/netbeans/pull/2727 .
(My NetBeans 12.4 build also has https://github.com/apache/netbeans/pull/3054 manually applied, but I don't think this impacts the issue reported here.)
Attachments
Issue Links
- is part of
-
NETBEANS-5292 nb-javac is source of several issues
- Open