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 252729 - The type of X is erroneous
Summary: The type of X is erroneous
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal with 4 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 244749 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-01 18:51 UTC by _ gtzabari
Modified: 2019-02-01 09:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (73.60 KB, application/octet-stream)
2015-06-01 18:51 UTC, _ gtzabari
Details
testcase (5.16 KB, application/octet-stream)
2015-06-01 19:51 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2015-06-01 18:51:21 UTC
Created attachment 153993 [details]
messages.log

Product Version: NetBeans IDE Dev (Build 201506010001)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)
User directory: C:\dev\Netbeans\user\dev
Cache directory: C:\dev\Netbeans\cache\dev

I've got a complex multi-module project that is triggering "The type of X is erroneous" in the IDE but the actual project compiles and runs just fine. I have attempted to rebuild the project and restart the IDE (something which has helped with such errors in the past) but the error remains.

This issue is 100% reproducible, unfortunately I was unable to reduce it to a minimal testcase (when I attempt to do so, the error goes away).

Bug #244749 sounded similar but their workaround (deleting and recreating the JAR file) did not help so I think we're talking about different issues here.

The details...

I am defining com.expedia.content.deposits.domain.bean.BeanBuilders.factUpdateable() in one class and statically importing it from another class. The class doing the import contains an error annotation "The type of factUpdateable() is erroneous".

If you look at the attached messages.log you will notice it warns about a failure to resolve com.expedia.content.deposits.domain.bean.BeanBuilders.factUpdateable() however the "ClasspathInfo" being logged contains C:\dev\.m2\repository\com\expedia\services\deposits\deposits-domain-data-api\1.4-SNAPSHOT\deposits-domain-data-api-1.4-SNAPSHOT.jar so it should be able to parse it correctly.

Would it help if I sent you a copy of this JAR file? I cannot share much code with you because this project is commercial.
Comment 1 _ gtzabari 2015-06-01 19:50:07 UTC
Ah ha! I've got a minimal testcase.

Repro steps:

1. Open netbeans
2. Open the attached testcase.
3. Shut down netbeans
4. Delete the cache directory
5. Reopen netbeans
6. Testcase should reopen automatically.
7. Netbeans will rescan the project and attach an error annotation to "DomainConverter.java" line 10 (invoking method "factUpdateable()")
8. Recompile the project (clean build).
9. Notice that the project does not contain any compiler errors.
10. Hover mouse over error annotation: "The type of factUpdateable() is erroneous"

This is 100% reproducible on my end.
Comment 2 _ gtzabari 2015-06-01 19:51:23 UTC
Created attachment 153995 [details]
testcase
Comment 3 _ gtzabari 2015-06-22 15:22:58 UTC
Dusan,

Is this problem reproducible on your end?
Comment 4 Svata Dedic 2015-09-15 13:34:56 UTC
*** Bug 244749 has been marked as a duplicate of this bug. ***
Comment 5 _ gtzabari 2015-12-07 19:05:53 UTC
Please set a Target Milestone for this issue.

It is driving me bonkers! I am unable to use code-complete in hundreds of Java files. Please fix it as soon as humanly possible.
Comment 6 russkiy 2019-02-01 09:55:01 UTC
8.2 too. Any fix/workaround?