mbien opened a new issue, #4299:
URL: https://github.com/apache/netbeans/issues/4299
### Body
The tests were running in headless mode until #4233, while switching the
xserver on, I noticed that the commit validation tests started to fail on 19ea
(locally reproducible too).
`org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest` fails on 19ea with:
```
[junit] An error occurred during parsing of
'/home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/o.n.m.i.k.V/at/Test41.java'.
Please report a bug against java/source and attach dump file
'/home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/userdir0/var/log/Test41.dump'.
[junit] Caused: java.lang.NullPointerException: Cannot read field "tsym"
because "imp.qualid.selected.type" is null
[junit] at
com.sun.tools.javac.comp.Check.checkImportedPackagesObservable(Check.java:4031)
[junit] at
com.sun.tools.javac.comp.TypeEnter.finishImports(TypeEnter.java:229)
[junit] at
com.sun.tools.javac.comp.TypeEnter.complete(TypeEnter.java:214)
[junit] at com.sun.tools.javac.code.Symbol.complete(Symbol.java:682)
[junit] at
com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1410)
[junit] at com.sun.tools.javac.comp.Enter.complete(Enter.java:610)
[junit] at com.sun.tools.javac.comp.Enter.main(Enter.java:587)
[junit] at
com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1042)
[junit] at
com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:345)
[junit] at
com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:282)
[junit] at
org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:747)
[junit] at
org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:540)
[junit] at
org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:141)
[junit] at
org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
[junit] at
org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
[junit] at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
[junit] at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
[junit] at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
[junit] [catch] at
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
[junit] at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[junit] at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[junit] at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
[junit] at
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
[junit] at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[junit] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
```
The test should be using nb-javac, however it appears as if 19ea javac is
used anyway?
https://github.com/apache/netbeans/blob/d410ca978f6b609199e7e5bb4965d4b9ff06e354/ide/ide.kit/nbproject/project.properties#L43
we saw this before in travis:
https://github.com/apache/netbeans/pull/3862#issuecomment-1079706207
There is another interesting warnings in the log which might be related to
the issue:
17, 18 and 19 all have this, no matter if in headless mode or not:
```
[junit] WARNING: Unknown module: jdk.compiler specified to --add-exports
[junit] WARNING: Unknown module: jdk.compiler specified to --add-opens
```
The module is obviously there. I suppose the boot classpath is tweaked at
some point.
### Committer
- [X] I acknowledge that I am a maintainer/committer in the Apache NetBeans
project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists