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.
Sometimes the editor window indicates a large number of compile errors that have to do with class resolution. I have one NetBeans project which compiles into a JAR file. A different project then includes that JAR file as a compile time library. The behavior is seemingly random, but often times the editor window indicates that all the classes in the library JAR file are not known. However, executing a build or clean & build on the project works just fine. When I hover the mouse cursor over an editor indicated compile error, it will typically report a message like so... "someFunction(); attempting to use incompatible return type found : com.mypackage.FInternalFrame required: FInternalFrame" This is reported even though the library JAR file includes a class under the com.mypackage package that is called FInternalFrame. I know that the code is fine because project compiles with no errors. I haven't found a reliable way to solve this issue, but a combination of closing/opening NetBeans and closing/opening the project seems to fix it. This isn't a huge issue, but it is very annoying.
reassigning to editor for evaluation, please feel free to reassign further
Can you please try deleting the cache at {userdir}/var/cache/index ? If it doesn't help, it is possible to attach sample project? Thanks
Overtake.
Hello, I'm very sorry that it has taken this long to try your suggestion. Deleting the contents of the index folder and restarting NetBeans did resolve the issue. Would you still like me to post a sample project? Thanks for you help
Thanks for response. It is good news that deleting cache helped. Sending the project is not necessary then. The problem was in broken cache - the question is what did break it? Any steps to reproduce are welcome although I know it's hard to find them out. I'll leave this issue opened for a while and INCOMPLETE, and see if anybody can find the action which break the cache Thanks
OK, I think I can reproduce it at will now. I have one project which is named Desktop. This project compiles into a JAR file. The second project is called RMS. The RMS project includes the Desktop JAR file as a compile-time library. This is the sequence of events... 1) I have both projects open, I have multiple java files from both projects open in editor, currently viewing one of the java file in the RMS project, and I notice the issue. 2) Exit NetBeans 3) Delete the cache index folder 4) Launch NetBeans (both projects are open by default) 5) NetBeans indexes and compiles the projects (in the lower right hand corner) - I wait for this to complete 6) Right-Click on the Desktop project and select "Clean & Build" 7) After the build completes, every java file in the RMS project that is open in the editor gets the little red '!' icon, indicating compile errors 8) Even though the currently viewed java file has the little '!' icon, there are no red lines. 9) View a different java file in the RMS project 10) There is a delay of about 2-3 seconds, then the editor window marks the code with red underlines Not sure if this makes a difference, but I have custom build scripts on both projects. I edited the build.xml file to override the following Ant tasks: -post-clean, -pre-compile, -do-jar, and jar Please let me know if I can provide any more helpful information. Thanks
Thanks for steps to reproduce. Covering under badges umbrella issue to solve as one problem.
"Please let me know if I can provide any more helpful information." - What IDE version are you using? Could you please attach here <ide-userdir>/var/log/messages.log? Would it be possible for you to attach the two projects that exhibit the problem? Thanks
Could you please try to run your IDE with -J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=FINE property, reproduce the issue, and attach the messages.log file to this issue? Also, attaching the build scripts of your projects could be useful. Thanks.
Reassigning all moonko's java/source bugs to myself.
I've got the same problem. I can't find the location specified for clearing my cache in my Windows 7 machine. This problem has been open for 6 years now. It seems some progress would have been made on it by now.