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.
Hi, I've many projects that are perfectly compiled and built but have some packages (of libraries in the project) that are no recognized by the syntax highlighter and marked as error (package xxx does not exists). Here a list of some problematic package import statements and the corresponding libraries (JAR file): import org.apache.commons.lang.ClassUtils; // Apache commons-lang-2.3.jar import org.apache.commons.lang.StringUtils; import org.apache.commons.cli.CommandLine; // Apache commons-cli-2.0.jar import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.cli.PosixParser; import info.clearthought.layout.TableLayout; // TableLayout.jar from https://tablelayout.dev.java.net import javax.help.HelpBroker; / JavaHelp 2.0, jh.jar import javax.help.HelpSet; import foxtrot.Task; // foxtrot.jar from http://foxtrot.sourceforge.net import foxtrot.Worker; These just to mention some.
Can you please try it with fresh userdir? (it's enough to delete ${userdir}/var/cache/mdrstorage folder)
My platform is MacOS X using Java 5. I've removed the content of ~/.netbeans/5.5.1/var/cache and the fix import problem with NB-5.5.1 still exists. I've removed the content of ~/.netbeans/6.0m10/var/cache and the bar error marks related to imports and usage of imported classes still exists.
The problem is most probably that there are sources attached to the library jars, but the sources do not cover all classes in the jar. In this case, the classes that are not in the sources are invisible to NB5.5 and NB6.0M10. This problem has been fixed recently, and should not appear in daily builds and beta 1. Could you please try a current daily build of NB6.0 or NB6.0 beta 1? Thanks.
The problem still exists. Here the version I'm using: Product Version: NetBeans IDE Dev (Build 200709191200) Java: 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87 System: Mac OS X version 10.4.10 running on i386; MacRoman; en_US (nb) Userdir: /Users/crosati/.netbeans/dev I will attach a small JAR that has no sources inside but when included in a project and one of its classes (e.g. it.acsys.multimedia.base.BasUtils) imported rises the problem.
Created attachment 49132 [details] A test case
So reopening then, but I cannot still reproduce it, even with your jar. Can you provide more info please? What type of project do you use? Do you add jar as single jar or it is included in some library?
The project is a Java Application (it was created with NB 4.x.x). All jars with problems are in Libraries included in the project.
I've found an interesting workarond! Moving the local CVS repository from /User/crosati/Projects/Projects.CVS to just /Projects.CVS (thus shortening the path of all jar files inside my projects) solved the problem!!!! I suspect the problem is related to the length of the involved jar files path names.
The issue is still live. This is what happens after installing NB 6.0rc2 starting from a new userdir: - after starting with a new userdir I needed to re-open all projects I'm currently working on (15 in total); - as each project is opened it is re-scanned and no red fledge appear on the project icon, thus no bad imports were found by the editor incremental compiler (or scanner), just as I've indicated in my last comment to issue #111218; - as soon as I close NB and restart it, after the initial rescan phase, the usual 4 project affected by the issue #111218 have their icon with the red fledge, and opening involved sources I found the usual "bad import" error, that will slow down a lot the scanning phase (up to 3-5min, where NB is blocked) each time I modify one of these files.
Verified with a collegue using the same NB6.0rc2 on windows: it is just a Mac OS version problem.
Switching INCOMPLETE -> NEW again ( I guess it is our "turn" now :) ) Jirka, please, did the additional info help? Thanks
I've switched to NB 6.1rc2 and the problem is disappeared. The only thing is that are not recognized packaged of Web Services' clients (the one NB put in classes subdirectory). Claudio
I'm glad to hear that the original problem is gone now. To the second problem: Does it happen in project where are the WS client's classes generate or in some dependent project?
The second problem happens in dependant projects. For the project in which the WS client was generated I've defined a Library having: - <project>/build/classes as "Classpath" - <project>/src and <project>/build/generated/wsimport/client as "Sources" - no "Javadoc" The dependant project where the problem occurs have the Library between its Conmpile-time Libraries. Claudio
Try starting IDE with -J-DCacheClassPath.keepJars=true it may help. It seems that the project sources are preferred to class files
Please, can you remember me which file I must modify (on MAC OS X) to add the -J-DCacheClassPath.keepJars=true statement. Thanks.
It's netbeans.conf in folder 'etc' in NB install dir. Here you can modify the property netbeans_default_options Unfortunately I don't remember where is the default install dir on Mac.
Thank you. It seems solve the problem (I've also enlarged the heap memory from the default 368m to 512m) Claudio
*** Issue 134885 has been marked as a duplicate of this issue. ***
Overtake.
Reassigning all moonko's java/source bugs to myself.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss