You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/10/11 01:28:31 UTC

[GitHub] [netbeans] bernard01 opened a new issue, #4766: NullPointerException in compiler, Java files with red error badges can't be run

bernard01 opened a new issue, #4766:
URL: https://github.com/apache/netbeans/issues/4766

   ### Apache NetBeans version
   
   Apache NetBeans 15
   
   ### What happened
   
   At NetBeans startup with a project group containing a single project, after the cache was deleted.
   The problem occurred before. That is why I deleted the cache.
   
   
   The project where the exception offurs worked before for a long time just a few weeks ago. Now it is broken and I cannot work with it.
   
   The project compiles without errors when compiled from the Projects windoe context menu.
   
   The broken java files are in the unit test hierarchy of a Maven project.
   
   I may be able to provide more info, but this will require some work. So I wait and see whether something obvious can be discovered from the log. 
   
   
   Product Version: Apache NetBeans IDE 15
   Java: 14; Java HotSpot(TM) 64-Bit Server VM 14+36-1461
   Runtime: Java(TM) SE Runtime Environment 14+36-1461
   System: Windows 7 version 6.1 running on amd64; Cp1252; en_NZ (nb)
   User directory: C:\Users\user\AppData\Roaming\NetBeans\15
   Cache directory: C:\Users\user\AppData\Local\NetBeans\Cache\15
   
   
   
   java.lang.NullPointerException
   	at com.sun.tools.javac.tree.TreeInfo.declarationFor(TreeInfo.java:792)
   	at com.sun.tools.javac.model.JavacElements.getTreeAndTopLevel(JavacElements.java:769)
   	at com.sun.tools.javac.model.JavacElements.getTreeAndTopLevel(JavacElements.java:789)
   	at com.sun.tools.javac.api.JavacTrees.getPath(JavacTrees.java:337)
   	at com.sun.tools.javac.api.JavacTrees.getPath(JavacTrees.java:327)
   	at org.netbeans.lib.nbjavac.services.NBJavacTrees.getPath(NBJavacTrees.java:56)
   	at org.netbeans.modules.java.source.indexing.VanillaCompileWorker$2.run(VanillaCompileWorker.java:352)
   	at org.netbeans.modules.java.source.parsing.FileManagerTransaction.runConcurrent(FileManagerTransaction.java:180)
   [catch] at org.netbeans.modules.java.source.indexing.VanillaCompileWorker.compile(VanillaCompileWorker.java:342)
   	at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:360)
   	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:274)
   	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2749)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.lambda$index$0(RepositoryUpdater.java:2626)
   	at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2625)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.lambda$scanSource$3(RepositoryUpdater.java:5735)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.lambda$runInContext$4(RepositoryUpdater.java:2119)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2117)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2098)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1400(RepositoryUpdater.java:135)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSource(RepositoryUpdater.java:5770)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSources(RepositoryUpdater.java:5443)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:5075)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$InitialRootsWork.getDone(RepositoryUpdater.java:5842)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3452)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6197)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$3400(RepositoryUpdater.java:5855)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.lambda$call$0(RepositoryUpdater.java:6116)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
   	at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6116)
   	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6112)
   	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.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6112)
   	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)
   
   
   ### How to reproduce
   
   I may be able to provide a reproducible test case. But perhaps I may not be able to because from experience, after simplifying projects to a test case, the problem often disappears.
   [messages.log](https://github.com/apache/netbeans/files/9750242/messages.log)
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 7
   
   ### JDK
   
   Java 14
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1334554642

   There are dependencies. It's not that easy. From my experience, my guess would be that you WILL NOT be able to reproduce it regardless. Why? Because I was not able to reproduce it when I removed files, made the project smaller and so on. I have a lot of experience with making test cases. I will give you the POM so you can inspect it. But I would appreciate if you could look at the stack trace to see what that compiler is complaining about. Perhaps you can give me a logging configuration so you can drill deeper. We need to assume that my environment is the one that we need to use to pinpoint the problem. Whatever it takes. I will also attach a log file from a fresh IDE 16 install. Here we can see how the IDE builds its dictionary and the compiler falls over while doing so.
   [messages-16-01.log](https://github.com/apache/netbeans/files/10136775/messages-16-01.log)
   
   [pom.zip](https://github.com/apache/netbeans/files/10136747/pom.zip)
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] jlahoda commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
jlahoda commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1347347822

   Interesting. Seems I can reproduce. I'll take a look. Thanks for a reproducible way to get the problem!
   
   (Overall, NetBeans runs javac in a slightly different way than the command line, and uses APIs that are not commonly used while building (unless an annotation processor or a Plugin uses them), so it sometimes runs into problems that are not seen in the ordinary/full compilation.)
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1337310545

   The initial stack trace was with a large project group containing the potentially erroneous projects mentioned. Meanwhile I reduced the case to a single project without project dependencies. Other project errors are now gone. The same error still occurs with JDK 19. The behavior is unchanged. The stack trace is slightly different. The stack trace of the NullPointerException is different.
   
   [messages-ide-15-jdk-19.log](https://github.com/apache/netbeans/files/10154383/messages-ide-15-jdk-19.log)
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1335935729

   Update: I have made a fresh install of NetBeans 12.6 using jdk1.8.0_201
   
   Unfortunately NetBeans 12.6 (the latest 12.x downloadable) is not an option because of the following error:
   
   Warning - could not install some modules: The nb-javac Java editing support library - The module named org.netbeans.modules.nbjavac.impl was needed and not found. The nb-javac Java editing support library - The module named org.netbeans.modules.nbjavac.api was needed and not found.
   
   Note that this is after a re-start, after
   prompts do download nb-javac download Java editing support library [2.0]
   which I confirmed and it was downloaded. A known issue that I reported personally, an issue that is now obsolete because later version come with nb-javac bundled.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1337137197

   Please keep your interaction in line with the ASF [code of conduct](https://www.apache.org/foundation/policies/conduct.html) _you agreed to when posting here_!
   
   Please try Michael's suggestion.
   
   Please also try running the IDE on JDK 17, or looking at the projects that seem to be reliant on it and making sure their JDK settings are correct.  The following section in your log file is suspicious - 
   
   ```
   Even though the source level of C:\bt\java\math\Geometry\Trigonometry2\src\main\java;C:\bt\java\math\Geometry\Trigonometry2\src\main\resources is set to: 17, java.lang.Record cannot be found on the system module path: 
   ```
   
   It's repeated later for `RegressionExample1`.  Are those dependencies?  Are those projects open in the IDE?  I've seen a few occasions where broken projects, even where the project is unrelated to the one you're working on, leads to a cascade of errors.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1336800329

   > Turning nb-javac off and using the latest compatible javac is a fairly convenient and quick to execute method to exclude a whole category of possible causes from the get go.
   
   No. Please read my original description:
   >The project compiles without errors when compiled from the Projects window context menu.
   
   We can't possibly improve that behavior by using a newer version of javac.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1296260950

   Just a hint: It looks like the bug disappears with this dependency in dependent projects removed:
   
   https://github.com/super-csv/super-csv
   
   Perhaps because super-csv has "super" in its package name which appears to be a problem with Java 9 modules. See:
   
   https://github.com/super-csv/super-csv/issues/190
   
   Even though all projects are compiled with Java 8 and the projects build successfully as I wrote before.
   
   super-csv is not mainstream, more like legacy.
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1336339877

   > you could try running NetBeans 16 on JDK 19.0.1 and uninstall the nb-javac module and check if it still occurs since that would be using a newer javac build.
   
   I would prefer an analytical approach not trial and error.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1296486080

   It is very difficult to produce a minimal test case. Perhaps even impossible. The problem gets smaller and goes away when I remove dependencies and code. I cannot find anything that stands out. The behavior appears to be erratic. This is consistent with my observation that this problem started appearing with no apparent reason such as a new NetBeans version. I would need some tools that help me debug the problem. Perhaps a logging configuration or other configuration switches?


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1336098176

   Update:
   I have changed the source level of the failing project to Java 11. Used NetBeans 16. Deleted the cache. Clean start.
   The error persists. Not related to Java 1.8. This is a regression, a nb-javac / javac parity issue. So we are no longer discussing NetBeans 12.
   [messages.log](https://github.com/apache/netbeans/files/10145872/messages.log)
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1335952879

   Update:
   I have made a fresh Java 16 install. I am getting the same error as with Java 15.
   Please advise what the next steps are to fix this issue. I am again asking whether it is possible to change the logging level in such a way that NetBeans gives ideas about what it is complaining about. It should be possible to get closer to the problem this way.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1346310514

   > However the root cause seems to be a package-info.java file in the main source tree. This file, which javac and nb-javac do not complain about, is missing the package statement.
   
   That exception is literally javac/nb-javac complaining about it!  It just happens to not affect compilation, although it doesn't work properly either.  javac seems to be lenient about package-info files, and leave them out or even compile without errors to another package if the package-info is in the wrong location.
   
   I'm surprised javac doesn't complain with this - seems an issue in the compiler to me.  Maybe @jlahoda has a thought on why, and best approach to not breaking indexing in this case / correctly report the error in the IDE?


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1336758619

   first as warning:
   If the tone doesn't improve I will simply close this and move on.
   
   But since its Christmas time I am going to extend an olive branch:
   > Your suggestion does not make any sense because when I uninstall nb-javac then I remove the obvious culprit.
   
   It is not the obvious culprit. nb-javac is almost identical to javac except it's bytecode level, If the problem would be indeed gone by removing nb-javac 19b33 from the equation, all we would have to do is to regenerate nb-javac from latest javac of JDK 19. If the problem persists, we can ignore nb-javac and someone who is interested in this could try to fix it either in NB code which calls into javac or contribute a fix upstream in javac itself assuming it is reproducible.
   
   Turning nb-javac off and using the latest compatible javac is a fairly convenient and quick to execute method to exclude a whole category of possible causes from the get go.
   
   > Can you see how ridiculous your suggestion is? You seem to be clueless.
   
   Don't judge so fast otherwise it ends up being projection. You could have simply asked and I would have explained the reasoning behind the suggestion.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1336655163

   > > you could try running NetBeans 16 on JDK 19.0.1 and uninstall the nb-javac module and check if it still occurs since that would be using a newer javac build.
   > 
   > I would prefer an analytical approach not trial and error.
   
   I think I need to clarify a few things.
   
   I have been working for a week now on this in addition to waiting for weeks. I am trying to reduce the test case to a manageable size. However, as I wrote before, when the size is reduces, the problems disappear. Because of this simple fact alone, there is a very low probability that you cannot reproduce the problem at your end. You don't seem to be responding to this established fact.
   
   I am certain that the operating system or any other software configurations and combinations cannot be blamed. My platform is as stable and performant as it gets. The entire Java stack is supported on it. I have uninstalled the anti-virus software to just give you an idea of my approach. I am running NetBeans with a single project and clean cache so it is super fast.
   
   Your suggestion does not make any sense because when I uninstall nb-javac then I remove the obvious culprit. Can you see how ridiculous your suggestion is? You seem to be clueless.
   
   I don't know whether the next point will even be understood and appreciated given what I have read so far.
   
   The nb-javac exception is pathetic, a slap in the face. A NullPointerException without any context information is useless. Someone with access to the nb-javac code needs to look at this and make a debug build for me to use.
   
   Considering all this, the time I spend on this looks like a complete waste because the responses I get from the NetBeans team seem to suggest that there is just no competent person even avaliable, just the level one support with the aim to manage the issue system and to limit the damage, to let the users do the work for them. There is no way that anybody who reads this issue record will come to a different conclusion.
   
   As you can see, I am extremely annoyed.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] BradWalker commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run

Posted by GitBox <gi...@apache.org>.
BradWalker commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1334431756

   > It is very difficult to produce a minimal test case. Perhaps even impossible. The problem gets smaller and goes away when I remove dependencies and code. I cannot find anything that stands out. The behavior appears to be erratic. This is consistent with my observation that this problem started appearing with no apparent reason such as a new NetBeans version. I would need some tools that help me debug the problem. Perhaps a logging configuration or other configuration switches?
   
   Hey @bernard01 , could you provide your project for me to look at.. I just want to be certain that I can reproduce it.
   
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1336317512

   you could try running NetBeans 16 on JDK 19.0.1 and uninstall the nb-javac module and check if it still occurs since that would be using a newer javac build.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] bernard01 commented on issue #4766: NullPointerException in compiler, Java files with red error badges can't be run nb-javac regression

Posted by GitBox <gi...@apache.org>.
bernard01 commented on issue #4766:
URL: https://github.com/apache/netbeans/issues/4766#issuecomment-1345645376

   Hi,
   Sorry for the delay.
   
   The attached project reproduces the error most of the time.
   Candidate for the NetBeans bug of the year.
   
   It appears that nb-javac loses vital info that causes its failure to find main classes in the test hierarchy of a maven project.
   
   This error disappears if complexity is reduced in the test classes which is a concern.
   
   However the root cause seems to be a package-info.java file in the main source tree. This file, which javac and nb-javac do not complain about, is missing the package statement.
   
   This is a bad trap where it is unlikely that a user will find that problem in a larger project where package-info.java is mainly used for documentation purposes.
   
   
   [TestProject.zip](https://github.com/apache/netbeans/files/10203139/TestProject.zip)
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists