This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244749 - The type of ... is erroneous
Summary: The type of ... is erroneous
Status: RESOLVED DUPLICATE of bug 252729
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-27 16:48 UTC by mark01635
Modified: 2019-03-16 06:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mark01635 2014-05-27 16:48:03 UTC
I have a complex multi-package Java development including many abstract or partially abstract classes and occasionally when compiling following a change, no errors from the compiler are reported in the log window, however several locations in the code are marked with the error "the type of ... is erroneous".  This prevents the running of the package within the IDE.  The problem persists following a restart of the IDE, however, after several minutes (maybe ten) the marked errors disappear without any intervention from the user and without any indication of what background processes are being run.  This is an inconsistent bug as I cannot reliably repeat it nor can I produce a sample that will cause it to occur.  I cannot tell whether the bug is due to the size or complexity of the code or what other cause.

Although this problem does seem to be self-correcting it does interfere with the process of development and testing.
Comment 1 mark01635 2014-05-29 11:27:10 UTC
Just checked and this bug does not occur on NB 7.4.
Comment 2 mark01635 2014-05-29 17:06:25 UTC
This is annoying, I had been using NB 7.4 for several hours before placing the previous comment, and then within 30 minutes it occurred on NB 7.4 exactly as on NB 8.0.
Comment 3 pquiring 2014-07-07 17:04:35 UTC
I've been having this same issue for years.  It seems to happen when you have JARs in your projects class path that get rebuilt.  NetBeans detects they are rebuilt and rescans them automatically.  But for some reason it gets confused intermittently (maybe it opens the file while it's still being written to?) and shows many of those "Type of ... is erroneous" messages.  Although compiling the project using Ant works fine (the errors are bogus).  The easiest fix is to delete the dependent JAR file and recompile it (which I do from the command line).  Netbeans will then do a rescan and the error messages go away.  

When you click on the error badges in the number column to show suggestions netbeans just "beeps".

Annoying little bug, but it's been happening a lot lately.
Comment 4 Farmer_Mark 2014-08-12 14:22:30 UTC
Having tried the suggestion from pquiring for some time now, I can confirm that his suggestion does work.  Perhaps there should be a re-scan option in the IDE somewhere.
Comment 5 pquiring 2014-10-26 12:48:07 UTC
(In reply to Farmer_Mark from comment #4)
> Having tried the suggestion from pquiring for some time now, I can confirm
> that his suggestion does work.  Perhaps there should be a re-scan option in
> the IDE somewhere.

There is a rescan option under the source menu -> scan for external changes.  Unfortunately it is timestamp based so it doesn't solve the problem.

I'm certain that netbeans is reading the dependency while it's being built by an external process before it's complete.  The JAR is probably empty during it's scan so anything that was dependent on it will appear broken.  But now netbeans will not re-read the file unless it's timestamp is changed.  That's why deleting the file and rebuilding it solves the bogus errors.
Comment 6 Svata Dedic 2015-09-15 13:34:56 UTC

*** This bug has been marked as a duplicate of bug 252729 ***
Comment 7 Thanos1234 2019-03-16 06:24:06 UTC
I am here for the share this amazing post need to follow here http://controlpanelwindows10.com and have to add control panel icon on desktop in windows 10.