You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Jens Zurawski <jz...@diegurus.de> on 2025/05/05 07:39:55 UTC

Possibility to force new calculation of error notifications in project view?

Hi folks,

I have a nasty problem every time I'm updating to a new Netbeans 
Version, which really prevents me from doing it too often. So every now 
and then I'm skipping a version to avoid this issue.

I'm working (besides others) on a big EE application with lots of JSF 
views and composition components and relying on a lot of libs including 
PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the 
Netbeans Version, on first opening of this big project, a random number 
of files (around half of them, sometimes more) are marked with the 
little red error notification icon. And this icon stays there even after 
a complete Clean and Build cycle (the project builds without any error). 
The only way to get rid of these icons is to open every single file into 
the editor, make some silly change (a single space is enough) and save 
it again. After that the icon eventually vanishes. Once all of the files 
are "cleaned" this way, from that time on Netbeans works like expected 
and really only marks files with errors.

I assume that there is some timing/order conflict in gathering and 
generating all needed informations upon start up and opening a project 
for the first time, but I have no clue, what it could be.

This isn't really a showstopper for me, because in the end everything 
seems to work, but it's annoying and irritating to see lots of "errors" 
which in fact are not errors.
A good workaround for me would be, if I could trigger the 
calculation/generation of these markers once every lib etc. has been 
scanned (or whatever causes that problem) so that I don't have to 
manually go through the whole project and open every second file just to 
get rid of these icons. Is there a way of doing this? Deleting the cache 
and restarting Netbeans doesn't do the trick.

If it matters: This is for Netbeans 25 (but already was this way since 
older versions, but sadly I don't recall when it starts to get my 
attention), I'm using Java 21 on Windows 10

cu
Jens


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

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


Re: Possibility to force new calculation of error notifications in project view?

Posted by Javier Ortiz Bultron <ja...@gmail.com>.
I've had similar behavior when changing branches in the source with the IDE
open. Especially if there are missing classes between the branches. Seems
that confuses the IDE. Only solution when it gets like that on my case is
to delete the cache folder.

On Tue, May 6, 2025, 2:14 PM ChrisOlsen <cr...@fastmail.com> wrote:

> Michael and All --
>
>    I am a completely amateur programmer, so this may have no relevance to
> the problem under discussion.
>
>   I experienced a similar (same?) red dot phenomena, and utilized the same
> fixes.  For me the dots occurred after I had copied over some old classes
> to the current project using the File Explorer (Windows 11).  (By copied
> over I mean that the class names were the same.)   Perhaps 15% of the few
> hundred source files subsequently appeared with the red error dots, and the
> dots disappeared after opening and saving the files.  I don't now recall if
> I had to do a silly space change.
>
>   I am using Java 17.
>
>   -- Chris
>
> On Tue, May 6, 2025, at 1:53 PM, Michael Bien wrote:
>
> On 5/5/25 09:39, Jens Zurawski wrote:
> > Hi folks,
> >
> > I have a nasty problem every time I'm updating to a new Netbeans
> Version, which really prevents me from doing it too often. So every now and
> then I'm skipping a version to avoid this issue.
> >
> > I'm working (besides others) on a big EE application with lots of JSF
> views and composition components and relying on a lot of libs including
> PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the
> Netbeans Version, on first opening of this big project, a random number of
> files (around half of them, sometimes more) are marked with the little red
> error notification icon.
>
> Any exceptions during code scan in the log when this happens?
>
> You can simulate a fresh config by starting NB with --userdir
> "C:\path\to\tempusr1". Once started open the project.
>
> (don't import the config if asked)
>
> what project type are we talking about? maven?
>
> -mbien
>
>
> > And this icon stays there even after a complete Clean and Build cycle
> (the project builds without any error). The only way to get rid of these
> icons is to open every single file into the editor, make some silly change
> (a single space is enough) and save it again. After that the icon
> eventually vanishes. Once all of the files are "cleaned" this way, from
> that time on Netbeans works like expected and really only marks files with
> errors.
> >
> > I assume that there is some timing/order conflict in gathering and
> generating all needed informations upon start up and opening a project for
> the first time, but I have no clue, what it could be.
> >
> > This isn't really a showstopper for me, because in the end everything
> seems to work, but it's annoying and irritating to see lots of "errors"
> which in fact are not errors.
> > A good workaround for me would be, if I could trigger the
> calculation/generation of these markers once every lib etc. has been
> scanned (or whatever causes that problem) so that I don't have to manually
> go through the whole project and open every second file just to get rid of
> these icons. Is there a way of doing this? Deleting the cache and
> restarting Netbeans doesn't do the trick.
> >
> > If it matters: This is for Netbeans 25 (but already was this way since
> older versions, but sadly I don't recall when it starts to get my
> attention), I'm using Java 21 on Windows 10
> >
> > cu
> > Jens
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: users-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: Possibility to force new calculation of error notifications in project view?

Posted by ChrisOlsen <cr...@fastmail.com>.
Michael and All --

   I am a completely amateur programmer, so this may have no relevance to the problem under discussion.

  I experienced a similar (same?) red dot phenomena, and utilized the same fixes.  For me the dots occurred after I had copied over some old classes to the current project using the File Explorer (Windows 11).  (By copied over I mean that the class names were the same.)   Perhaps 15% of the few hundred source files subsequently appeared with the red error dots, and the dots disappeared after opening and saving the files.  I don't now recall if I had to do a silly space change.

  I am using Java 17.

  -- Chris

On Tue, May 6, 2025, at 1:53 PM, Michael Bien wrote:
> On 5/5/25 09:39, Jens Zurawski wrote:
> > Hi folks,
> >
> > I have a nasty problem every time I'm updating to a new Netbeans Version, which really prevents me from doing it too often. So every now and then I'm skipping a version to avoid this issue.
> >
> > I'm working (besides others) on a big EE application with lots of JSF views and composition components and relying on a lot of libs including PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the Netbeans Version, on first opening of this big project, a random number of files (around half of them, sometimes more) are marked with the little red error notification icon.
> 
> Any exceptions during code scan in the log when this happens?
> 
> You can simulate a fresh config by starting NB with --userdir "C:\path\to\tempusr1". Once started open the project.
> 
> (don't import the config if asked)
> 
> what project type are we talking about? maven?
> 
> -mbien
> 
> 
> > And this icon stays there even after a complete Clean and Build cycle (the project builds without any error). The only way to get rid of these icons is to open every single file into the editor, make some silly change (a single space is enough) and save it again. After that the icon eventually vanishes. Once all of the files are "cleaned" this way, from that time on Netbeans works like expected and really only marks files with errors.
> >
> > I assume that there is some timing/order conflict in gathering and generating all needed informations upon start up and opening a project for the first time, but I have no clue, what it could be.
> >
> > This isn't really a showstopper for me, because in the end everything seems to work, but it's annoying and irritating to see lots of "errors" which in fact are not errors.
> > A good workaround for me would be, if I could trigger the calculation/generation of these markers once every lib etc. has been scanned (or whatever causes that problem) so that I don't have to manually go through the whole project and open every second file just to get rid of these icons. Is there a way of doing this? Deleting the cache and restarting Netbeans doesn't do the trick.
> >
> > If it matters: This is for Netbeans 25 (but already was this way since older versions, but sadly I don't recall when it starts to get my attention), I'm using Java 21 on Windows 10
> >
> > cu
> > Jens
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: users-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 

Re: Possibility to force new calculation of error notifications in project view?

Posted by Jens Zurawski <jz...@diegurus.de>.
Hi Michael,

sorry for the late response, I've got hold busy from my customer the 
last days.

Yes it's a maven Project, some Java EE8 web application (so it's still 
on the javax Namespace, but the switch to Jakarta is planned in the near 
future).
I'm not sure if there were Exceptions related to the scanning/parsing. 
I'll have to check this. I'll do some tests when I'm back at work on 
Monday or Tuesday.

cu
Jens

Am 06.05.2025 um 20:53 schrieb Michael Bien:
> On 5/5/25 09:39, Jens Zurawski wrote:
>> Hi folks,
>>
>> I have a nasty problem every time I'm updating to a new Netbeans Version, which really prevents me from doing it too often. So every now and then I'm skipping a version to avoid this issue.
>>
>> I'm working (besides others) on a big EE application with lots of JSF views and composition components and relying on a lot of libs including PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the Netbeans Version, on first opening of this big project, a random number of files (around half of them, sometimes more) are marked with the little red error notification icon.
> Any exceptions during code scan in the log when this happens?
>
> You can simulate a fresh config by starting NB with --userdir "C:\path\to\tempusr1". Once started open the project.
>
> (don't import the config if asked)
>
> what project type are we talking about? maven?
>
> -mbien
>
>
>> And this icon stays there even after a complete Clean and Build cycle (the project builds without any error). The only way to get rid of these icons is to open every single file into the editor, make some silly change (a single space is enough) and save it again. After that the icon eventually vanishes. Once all of the files are "cleaned" this way, from that time on Netbeans works like expected and really only marks files with errors.
>>
>> I assume that there is some timing/order conflict in gathering and generating all needed informations upon start up and opening a project for the first time, but I have no clue, what it could be.
>>
>> This isn't really a showstopper for me, because in the end everything seems to work, but it's annoying and irritating to see lots of "errors" which in fact are not errors.
>> A good workaround for me would be, if I could trigger the calculation/generation of these markers once every lib etc. has been scanned (or whatever causes that problem) so that I don't have to manually go through the whole project and open every second file just to get rid of these icons. Is there a way of doing this? Deleting the cache and restarting Netbeans doesn't do the trick.
>>
>> If it matters: This is for Netbeans 25 (but already was this way since older versions, but sadly I don't recall when it starts to get my attention), I'm using Java 21 on Windows 10
>>
>> cu
>> Jens
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>


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

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


Re: Possibility to force new calculation of error notifications in project view?

Posted by Jens Zurawski <jz...@diegurus.de>.
Hi Michael,

thanks a lot. I'll check again on update to NB 26.

cu
Jens


Am 12.05.2025 um 19:23 schrieb Michael Bien:
> On 5/12/25 14:49, Jens Zurawski wrote:
>> Hi Michael,
>>
>> I've made a test like you have suggested. I've started NB 25 with a new and empty UserDir and no imported old config and then opened the Project. Current environment is:
>> "Product Version: Apache NetBeans IDE 25
>> Java: 21.0.3; Java HotSpot(TM) 64-Bit Server VM 21.0.3+7-LTS-152
>> Runtime: Java(TM) SE Runtime Environment 21.0.3+7-LTS-152
>> System: Windows 10 version 10.0 running on amd64; UTF-8; de_DE (nb)
>> User directory: E:\test\Netbeans
>> Cache directory: E:\test\Netbeans\var\cache"
>>
>> Funny result is: No error badges at all this time. But I've got errors/exceptions in the messages.log file:
>>
>> It's flooded with these lines:
>> "Even though the source level of C:\Develop\ProjectDir\src\main\java;C:\Develop\ProjectDir\src\main\webapp;C:\Develop\ProjectDir\src\main\resources is set to: 11, java.util.zip.CRC32C cannot be found on the system module path:"
>>
>> Most of the times it's listed like "WARNING [null]: Last record repeated 222 times in total."
>>
>> I have no clue, what this error is trying to tell me.
>>
>> And some singleton Exceptions like this:
>>
>> ---------------------------8<-------------------------------------
>> WARNING [org.netbeans.modules.csl.editor.semantic.SemanticHighlighter]
>> java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "highlights" is null
>>      at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:167)
> this issue should be fixed in NB 26
>
> https://github.com/apache/netbeans/pull/8307
>
> best regards,
>
> michael
>
>
>>      at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:125)
>>      at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:133)
>>      at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:133)
>>      at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.lambda$run$0(SemanticHighlighter.java:95)
>>      at org.netbeans.modules.parsing.api.ParserManager$1.run(ParserManager.java:118)
>>      at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
>>      at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:197)
>>      at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:180)
>>      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)
>> Caused: org.netbeans.modules.parsing.spi.ParseException
>>      at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:186)
>>      at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:83)
>>      at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:121)
>> [catch] at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:95)
>>      at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:57)
>>      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:288)
>>      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:572)
>>      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
>>      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
>>      at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>>      at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
>>      at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)
>> ---------------------------8<-------------------------------------
>>
>> Any idea, what is going wrong here? Or any hint what I can do to isolate the problem more?
>>
>> cu
>> Jens
>>
>>
>>
>> Am 06.05.2025 um 20:53 schrieb Michael Bien:
>>> On 5/5/25 09:39, Jens Zurawski wrote:
>>>> Hi folks,
>>>>
>>>> I have a nasty problem every time I'm updating to a new Netbeans Version, which really prevents me from doing it too often. So every now and then I'm skipping a version to avoid this issue.
>>>>
>>>> I'm working (besides others) on a big EE application with lots of JSF views and composition components and relying on a lot of libs including PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the Netbeans Version, on first opening of this big project, a random number of files (around half of them, sometimes more) are marked with the little red error notification icon.
>>> Any exceptions during code scan in the log when this happens?
>>>
>>> You can simulate a fresh config by starting NB with --userdir "C:\path\to\tempusr1". Once started open the project.
>>>
>>> (don't import the config if asked)
>>>
>>> what project type are we talking about? maven?
>>>
>>> -mbien
>>>
>>>
>>>> And this icon stays there even after a complete Clean and Build cycle (the project builds without any error). The only way to get rid of these icons is to open every single file into the editor, make some silly change (a single space is enough) and save it again. After that the icon eventually vanishes. Once all of the files are "cleaned" this way, from that time on Netbeans works like expected and really only marks files with errors.
>>>>
>>>> I assume that there is some timing/order conflict in gathering and generating all needed informations upon start up and opening a project for the first time, but I have no clue, what it could be.
>>>>
>>>> This isn't really a showstopper for me, because in the end everything seems to work, but it's annoying and irritating to see lots of "errors" which in fact are not errors.
>>>> A good workaround for me would be, if I could trigger the calculation/generation of these markers once every lib etc. has been scanned (or whatever causes that problem) so that I don't have to manually go through the whole project and open every second file just to get rid of these icons. Is there a way of doing this? Deleting the cache and restarting Netbeans doesn't do the trick.
>>>>
>>>> If it matters: This is for Netbeans 25 (but already was this way since older versions, but sadly I don't recall when it starts to get my attention), I'm using Java 21 on Windows 10
>>>>
>>>> cu
>>>> Jens
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>>>> For additional commands, e-mail: users-help@netbeans.apache.org
>>>>
>>>> For further information about the NetBeans mailing lists, visit:
>>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>>> For additional commands, e-mail: users-help@netbeans.apache.org
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>


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

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


Re: Possibility to force new calculation of error notifications in project view?

Posted by Michael Bien <mb...@gmail.com>.
On 5/12/25 14:49, Jens Zurawski wrote:
> Hi Michael,
>
> I've made a test like you have suggested. I've started NB 25 with a new and empty UserDir and no imported old config and then opened the Project. Current environment is:
> "Product Version: Apache NetBeans IDE 25
> Java: 21.0.3; Java HotSpot(TM) 64-Bit Server VM 21.0.3+7-LTS-152
> Runtime: Java(TM) SE Runtime Environment 21.0.3+7-LTS-152
> System: Windows 10 version 10.0 running on amd64; UTF-8; de_DE (nb)
> User directory: E:\test\Netbeans
> Cache directory: E:\test\Netbeans\var\cache"
>
> Funny result is: No error badges at all this time. But I've got errors/exceptions in the messages.log file:
>
> It's flooded with these lines:
> "Even though the source level of C:\Develop\ProjectDir\src\main\java;C:\Develop\ProjectDir\src\main\webapp;C:\Develop\ProjectDir\src\main\resources is set to: 11, java.util.zip.CRC32C cannot be found on the system module path: "
>
> Most of the times it's listed like "WARNING [null]: Last record repeated 222 times in total."
>
> I have no clue, what this error is trying to tell me.
>
> And some singleton Exceptions like this:
>
> ---------------------------8<-------------------------------------
> WARNING [org.netbeans.modules.csl.editor.semantic.SemanticHighlighter]
> java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "highlights" is null
>     at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:167)

this issue should be fixed in NB 26

https://github.com/apache/netbeans/pull/8307

best regards,

michael


>     at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:125)
>     at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:133)
>     at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:133)
>     at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.lambda$run$0(SemanticHighlighter.java:95)
>     at org.netbeans.modules.parsing.api.ParserManager$1.run(ParserManager.java:118)
>     at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
>     at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:197)
>     at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:180)
>     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)
> Caused: org.netbeans.modules.parsing.spi.ParseException
>     at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:186)
>     at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:83)
>     at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:121)
> [catch] at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:95)
>     at org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:57)
>     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:288)
>     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:572)
>     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
>     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
>     at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>     at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
>     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)
> ---------------------------8<-------------------------------------
>
> Any idea, what is going wrong here? Or any hint what I can do to isolate the problem more?
>
> cu
> Jens
>
>
>
> Am 06.05.2025 um 20:53 schrieb Michael Bien:
>> On 5/5/25 09:39, Jens Zurawski wrote:
>>> Hi folks,
>>>
>>> I have a nasty problem every time I'm updating to a new Netbeans Version, which really prevents me from doing it too often. So every now and then I'm skipping a version to avoid this issue.
>>>
>>> I'm working (besides others) on a big EE application with lots of JSF views and composition components and relying on a lot of libs including PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the Netbeans Version, on first opening of this big project, a random number of files (around half of them, sometimes more) are marked with the little red error notification icon.
>> Any exceptions during code scan in the log when this happens?
>>
>> You can simulate a fresh config by starting NB with --userdir "C:\path\to\tempusr1". Once started open the project.
>>
>> (don't import the config if asked)
>>
>> what project type are we talking about? maven?
>>
>> -mbien
>>
>>
>>> And this icon stays there even after a complete Clean and Build cycle (the project builds without any error). The only way to get rid of these icons is to open every single file into the editor, make some silly change (a single space is enough) and save it again. After that the icon eventually vanishes. Once all of the files are "cleaned" this way, from that time on Netbeans works like expected and really only marks files with errors.
>>>
>>> I assume that there is some timing/order conflict in gathering and generating all needed informations upon start up and opening a project for the first time, but I have no clue, what it could be.
>>>
>>> This isn't really a showstopper for me, because in the end everything seems to work, but it's annoying and irritating to see lots of "errors" which in fact are not errors.
>>> A good workaround for me would be, if I could trigger the calculation/generation of these markers once every lib etc. has been scanned (or whatever causes that problem) so that I don't have to manually go through the whole project and open every second file just to get rid of these icons. Is there a way of doing this? Deleting the cache and restarting Netbeans doesn't do the trick.
>>>
>>> If it matters: This is for Netbeans 25 (but already was this way since older versions, but sadly I don't recall when it starts to get my attention), I'm using Java 21 on Windows 10
>>>
>>> cu
>>> Jens
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>>> For additional commands, e-mail: users-help@netbeans.apache.org
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>


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

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


Re: Possibility to force new calculation of error notifications in project view?

Posted by Jens Zurawski <jz...@diegurus.de>.
Hi Michael,

I've made a test like you have suggested. I've started NB 25 with a new 
and empty UserDir and no imported old config and then opened the 
Project. Current environment is:
"Product Version: Apache NetBeans IDE 25
Java: 21.0.3; Java HotSpot(TM) 64-Bit Server VM 21.0.3+7-LTS-152
Runtime: Java(TM) SE Runtime Environment 21.0.3+7-LTS-152
System: Windows 10 version 10.0 running on amd64; UTF-8; de_DE (nb)
User directory: E:\test\Netbeans
Cache directory: E:\test\Netbeans\var\cache"

Funny result is: No error badges at all this time. But I've got 
errors/exceptions in the messages.log file:

It's flooded with these lines:
"Even though the source level of 
C:\Develop\ProjectDir\src\main\java;C:\Develop\ProjectDir\src\main\webapp;C:\Develop\ProjectDir\src\main\resources 
is set to: 11, java.util.zip.CRC32C cannot be found on the system module 
path: "

Most of the times it's listed like "WARNING [null]: Last record repeated 
222 times in total."

I have no clue, what this error is trying to tell me.

And some singleton Exceptions like this:

---------------------------8<-------------------------------------
WARNING [org.netbeans.modules.csl.editor.semantic.SemanticHighlighter]
java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" 
because "highlights" is null
     at 
org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:167)
     at 
org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:125)
     at 
org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:133)
     at 
org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.processColorings(SemanticHighlighter.java:133)
     at 
org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.lambda$run$0(SemanticHighlighter.java:95)
     at 
org.netbeans.modules.parsing.api.ParserManager$1.run(ParserManager.java:118)
     at 
org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
     at 
org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:197)
     at 
org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:180)
     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)
Caused: org.netbeans.modules.parsing.spi.ParseException
     at 
org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:186)
     at 
org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:83)
     at 
org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:121)
[catch] at 
org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:95)
     at 
org.netbeans.modules.csl.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:57)
     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:288)
     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:572)
     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
     at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
     at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
     at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
     at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)
---------------------------8<-------------------------------------

Any idea, what is going wrong here? Or any hint what I can do to isolate 
the problem more?

cu
Jens



Am 06.05.2025 um 20:53 schrieb Michael Bien:
> On 5/5/25 09:39, Jens Zurawski wrote:
>> Hi folks,
>>
>> I have a nasty problem every time I'm updating to a new Netbeans Version, which really prevents me from doing it too often. So every now and then I'm skipping a version to avoid this issue.
>>
>> I'm working (besides others) on a big EE application with lots of JSF views and composition components and relying on a lot of libs including PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the Netbeans Version, on first opening of this big project, a random number of files (around half of them, sometimes more) are marked with the little red error notification icon.
> Any exceptions during code scan in the log when this happens?
>
> You can simulate a fresh config by starting NB with --userdir "C:\path\to\tempusr1". Once started open the project.
>
> (don't import the config if asked)
>
> what project type are we talking about? maven?
>
> -mbien
>
>
>> And this icon stays there even after a complete Clean and Build cycle (the project builds without any error). The only way to get rid of these icons is to open every single file into the editor, make some silly change (a single space is enough) and save it again. After that the icon eventually vanishes. Once all of the files are "cleaned" this way, from that time on Netbeans works like expected and really only marks files with errors.
>>
>> I assume that there is some timing/order conflict in gathering and generating all needed informations upon start up and opening a project for the first time, but I have no clue, what it could be.
>>
>> This isn't really a showstopper for me, because in the end everything seems to work, but it's annoying and irritating to see lots of "errors" which in fact are not errors.
>> A good workaround for me would be, if I could trigger the calculation/generation of these markers once every lib etc. has been scanned (or whatever causes that problem) so that I don't have to manually go through the whole project and open every second file just to get rid of these icons. Is there a way of doing this? Deleting the cache and restarting Netbeans doesn't do the trick.
>>
>> If it matters: This is for Netbeans 25 (but already was this way since older versions, but sadly I don't recall when it starts to get my attention), I'm using Java 21 on Windows 10
>>
>> cu
>> Jens
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>


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

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


Re: Possibility to force new calculation of error notifications in project view?

Posted by Michael Bien <mb...@gmail.com>.
On 5/5/25 09:39, Jens Zurawski wrote:
> Hi folks,
>
> I have a nasty problem every time I'm updating to a new Netbeans Version, which really prevents me from doing it too often. So every now and then I'm skipping a version to avoid this issue.
>
> I'm working (besides others) on a big EE application with lots of JSF views and composition components and relying on a lot of libs including PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the Netbeans Version, on first opening of this big project, a random number of files (around half of them, sometimes more) are marked with the little red error notification icon.

Any exceptions during code scan in the log when this happens?

You can simulate a fresh config by starting NB with --userdir "C:\path\to\tempusr1". Once started open the project.

(don't import the config if asked)

what project type are we talking about? maven?

-mbien


> And this icon stays there even after a complete Clean and Build cycle (the project builds without any error). The only way to get rid of these icons is to open every single file into the editor, make some silly change (a single space is enough) and save it again. After that the icon eventually vanishes. Once all of the files are "cleaned" this way, from that time on Netbeans works like expected and really only marks files with errors.
>
> I assume that there is some timing/order conflict in gathering and generating all needed informations upon start up and opening a project for the first time, but I have no clue, what it could be.
>
> This isn't really a showstopper for me, because in the end everything seems to work, but it's annoying and irritating to see lots of "errors" which in fact are not errors.
> A good workaround for me would be, if I could trigger the calculation/generation of these markers once every lib etc. has been scanned (or whatever causes that problem) so that I don't have to manually go through the whole project and open every second file just to get rid of these icons. Is there a way of doing this? Deleting the cache and restarting Netbeans doesn't do the trick.
>
> If it matters: This is for Netbeans 25 (but already was this way since older versions, but sadly I don't recall when it starts to get my attention), I'm using Java 21 on Windows 10
>
> cu
> Jens
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>


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

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


Re: Possibility to force new calculation of error notifications in project view?

Posted by Jens Zurawski <jz...@diegurus.de>.
Hi Eirik,

thanks for your answer, but I've already tested with clearing the cahce 
dir, without success. And as far as I can say, it seems not to be 
related to any Annotation, because it's only the facelets with the error 
badges (so only the xhtml files).

cu
Jens


Am 06.05.2025 um 14:50 schrieb Eirik Bakke:
>
> Also, I remember that the stray error badges could be cleared by 
> exiting NetBeans, clearing the "cache directory" (not the "user 
> directory"!), and starting NetBeans again. You can see the location of 
> the cache directory in the About dialog.
>
> -- Eirik
>
> *From: *Eirik Bakke <eb...@ultorg.com.INVALID>
> *Date: *Tuesday, May 6, 2025 at 2:49 PM
> *To: *Jens Zurawski <jz...@diegurus.de>, "users@netbeans.apache.org" 
> <us...@netbeans.apache.org>
> *Subject: *Re: Possibility to force new calculation of error 
> notifications in project view?
>
> I used to have this problem all the time myself, doing the same 
> workaround (open each file, save it to remove the stray error badge). 
> But at some point (several years ago) it stopped happening for me. I'm 
> on Java 24 now.
>
> One source of mysterious errors I observed (in NetBeans and other 
> tools) was caused by annotations in enum constructors, e.g. the 
> "@Nullable" annotation in the following example:
>
> public enum TemporalStyle {
>
>   ISO('i', null),
>
>   LOCALIZED_SHORT('s', FormatStyle.SHORT),
>
>   LOCALIZED_MEDIUM('m', FormatStyle.MEDIUM);
>
>   private TemporalStyle(char c, @Nullable FormatStyle fs) {
>
>     ...
>
>   }
>
>   ...
>
> }
>
> See https://bugs.openjdk.org/browse/JDK-8024694 . It may or may not 
> have anything to do with the stray error badge problem, but the latter 
> problem disappeared for me around the same time as when I removed all 
> annotations in enum constructors.
>
> -- Eirik
>
> *From: *Jens Zurawski <jz...@diegurus.de>
> *Date: *Monday, May 5, 2025 at 9:41 AM
> *To: *"users@netbeans.apache.org" <us...@netbeans.apache.org>
> *Subject: *Possibility to force new calculation of error notifications 
> in project view?
>
> Hi folks,
>
> I have a nasty problem every time I'm updating to a new Netbeans
>
> Version, which really prevents me from doing it too often. So every now
>
> and then I'm skipping a version to avoid this issue.
>
> I'm working (besides others) on a big EE application with lots of JSF
>
> views and composition components and relying on a lot of libs including
>
> PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the
>
> Netbeans Version, on first opening of this big project, a random number
>
> of files (around half of them, sometimes more) are marked with the
>
> little red error notification icon. And this icon stays there even after
>
> a complete Clean and Build cycle (the project builds without any error).
>
> The only way to get rid of these icons is to open every single file into
>
> the editor, make some silly change (a single space is enough) and save
>
> it again. After that the icon eventually vanishes. Once all of the files
>
> are "cleaned" this way, from that time on Netbeans works like expected
>
> and really only marks files with errors.
>
> I assume that there is some timing/order conflict in gathering and
>
> generating all needed informations upon start up and opening a project
>
> for the first time, but I have no clue, what it could be.
>
> This isn't really a showstopper for me, because in the end everything
>
> seems to work, but it's annoying and irritating to see lots of "errors"
>
> which in fact are not errors.
>
> A good workaround for me would be, if I could trigger the
>
> calculation/generation of these markers once every lib etc. has been
>
> scanned (or whatever causes that problem) so that I don't have to
>
> manually go through the whole project and open every second file just to
>
> get rid of these icons. Is there a way of doing this? Deleting the cache
>
> and restarting Netbeans doesn't do the trick.
>
> If it matters: This is for Netbeans 25 (but already was this way since
>
> older versions, but sadly I don't recall when it starts to get my
>
> attention), I'm using Java 21 on Windows 10
>
> cu
>
> Jens
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
>
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

Re: Possibility to force new calculation of error notifications in project view?

Posted by Eirik Bakke <eb...@ultorg.com.INVALID>.
Also, I remember that the stray error badges could be cleared by exiting NetBeans, clearing the "cache directory" (not the "user directory"!), and starting NetBeans again. You can see the location of the cache directory in the About dialog.

-- Eirik

From: Eirik Bakke <eb...@ultorg.com.INVALID>
Date: Tuesday, May 6, 2025 at 2:49 PM
To: Jens Zurawski <jz...@diegurus.de>, "users@netbeans.apache.org" <us...@netbeans.apache.org>
Subject: Re: Possibility to force new calculation of error notifications in project view?

I used to have this problem all the time myself, doing the same workaround (open each file, save it to remove the stray error badge). But at some point (several years ago) it stopped happening for me. I'm on Java 24 now.

One source of mysterious errors I observed (in NetBeans and other tools) was caused by annotations in enum constructors, e.g. the "@Nullable" annotation in the following example:

public enum TemporalStyle {
  ISO('i', null),
  LOCALIZED_SHORT('s', FormatStyle.SHORT),
  LOCALIZED_MEDIUM('m', FormatStyle.MEDIUM);

  private TemporalStyle(char c, @Nullable FormatStyle fs) {
    ...
  }
  ...
}

See https://bugs.openjdk.org/browse/JDK-8024694 . It may or may not have anything to do with the stray error badge problem, but the latter problem disappeared for me around the same time as when I removed all annotations in enum constructors.

-- Eirik

From: Jens Zurawski <jz...@diegurus.de>
Date: Monday, May 5, 2025 at 9:41 AM
To: "users@netbeans.apache.org" <us...@netbeans.apache.org>
Subject: Possibility to force new calculation of error notifications in project view?

Hi folks,

I have a nasty problem every time I'm updating to a new Netbeans
Version, which really prevents me from doing it too often. So every now
and then I'm skipping a version to avoid this issue.

I'm working (besides others) on a big EE application with lots of JSF
views and composition components and relying on a lot of libs including
PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the
Netbeans Version, on first opening of this big project, a random number
of files (around half of them, sometimes more) are marked with the
little red error notification icon. And this icon stays there even after
a complete Clean and Build cycle (the project builds without any error).
The only way to get rid of these icons is to open every single file into
the editor, make some silly change (a single space is enough) and save
it again. After that the icon eventually vanishes. Once all of the files
are "cleaned" this way, from that time on Netbeans works like expected
and really only marks files with errors.

I assume that there is some timing/order conflict in gathering and
generating all needed informations upon start up and opening a project
for the first time, but I have no clue, what it could be.

This isn't really a showstopper for me, because in the end everything
seems to work, but it's annoying and irritating to see lots of "errors"
which in fact are not errors.
A good workaround for me would be, if I could trigger the
calculation/generation of these markers once every lib etc. has been
scanned (or whatever causes that problem) so that I don't have to
manually go through the whole project and open every second file just to
get rid of these icons. Is there a way of doing this? Deleting the cache
and restarting Netbeans doesn't do the trick.

If it matters: This is for Netbeans 25 (but already was this way since
older versions, but sadly I don't recall when it starts to get my
attention), I'm using Java 21 on Windows 10

cu
Jens


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org<ma...@netbeans.apache.org>
For additional commands, e-mail: users-help@netbeans.apache.org<ma...@netbeans.apache.org>

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



Re: Possibility to force new calculation of error notifications in project view?

Posted by Eirik Bakke <eb...@ultorg.com.INVALID>.
I used to have this problem all the time myself, doing the same workaround (open each file, save it to remove the stray error badge). But at some point (several years ago) it stopped happening for me. I'm on Java 24 now.

One source of mysterious errors I observed (in NetBeans and other tools) was caused by annotations in enum constructors, e.g. the "@Nullable" annotation in the following example:

public enum TemporalStyle {
  ISO('i', null),
  LOCALIZED_SHORT('s', FormatStyle.SHORT),
  LOCALIZED_MEDIUM('m', FormatStyle.MEDIUM);

  private TemporalStyle(char c, @Nullable FormatStyle fs) {
    ...
  }
  ...
}

See https://bugs.openjdk.org/browse/JDK-8024694 . It may or may not have anything to do with the stray error badge problem, but the latter problem disappeared for me around the same time as when I removed all annotations in enum constructors.

-- Eirik

From: Jens Zurawski <jz...@diegurus.de>
Date: Monday, May 5, 2025 at 9:41 AM
To: "users@netbeans.apache.org" <us...@netbeans.apache.org>
Subject: Possibility to force new calculation of error notifications in project view?

Hi folks,

I have a nasty problem every time I'm updating to a new Netbeans
Version, which really prevents me from doing it too often. So every now
and then I'm skipping a version to avoid this issue.

I'm working (besides others) on a big EE application with lots of JSF
views and composition components and relying on a lot of libs including
PrimeFaces, OmniFaces, DeltaSpike etc. Now, every time I'm upgrading the
Netbeans Version, on first opening of this big project, a random number
of files (around half of them, sometimes more) are marked with the
little red error notification icon. And this icon stays there even after
a complete Clean and Build cycle (the project builds without any error).
The only way to get rid of these icons is to open every single file into
the editor, make some silly change (a single space is enough) and save
it again. After that the icon eventually vanishes. Once all of the files
are "cleaned" this way, from that time on Netbeans works like expected
and really only marks files with errors.

I assume that there is some timing/order conflict in gathering and
generating all needed informations upon start up and opening a project
for the first time, but I have no clue, what it could be.

This isn't really a showstopper for me, because in the end everything
seems to work, but it's annoying and irritating to see lots of "errors"
which in fact are not errors.
A good workaround for me would be, if I could trigger the
calculation/generation of these markers once every lib etc. has been
scanned (or whatever causes that problem) so that I don't have to
manually go through the whole project and open every second file just to
get rid of these icons. Is there a way of doing this? Deleting the cache
and restarting Netbeans doesn't do the trick.

If it matters: This is for Netbeans 25 (but already was this way since
older versions, but sadly I don't recall when it starts to get my
attention), I'm using Java 21 on Windows 10

cu
Jens


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org<ma...@netbeans.apache.org>
For additional commands, e-mail: users-help@netbeans.apache.org<ma...@netbeans.apache.org>

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