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 134292 - The editor shows "package does not exist" and "cannot find symbol" errors where no error exists
Summary: The editor shows "package does not exist" and "cannot find symbol" errors whe...
Status: RESOLVED DUPLICATE of bug 121853
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 20:37 UTC by vicricker
Modified: 2008-05-07 17:48 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 vicricker 2008-04-30 20:37:33 UTC
Sometimes the editor shows errors in my code regarding references to packages/classes that I have included from another
project.  (Properties/Libraries/Add Project...)  I can clean/build the project without errors and I can compile the
individual file that NB shows as having errors just fine.

I copied the jar file from project that I'm including to another folder and included it as "Add JAR/Folder" and the
problem seems to be fixed.  Oddly, if I add it as "JAR/Folder" from the project's dist dir, it fails.

What's odd is that I have other projects included that don't have this problem.

The only difference that I can see is that the project that doesn't work has no source in it.  It only has JAXB bindings
and the code in the jar is generated from my xsd file.
Comment 1 Jiri Prox 2008-05-03 22:20:48 UTC
This is designed behavior. IDE prefers sources to jar if it detects that the jar is part of projects. Its because the
sources provides 'fresh' information without building the output jar.

To turn this preference off use -J-DCacheClassPath.keepJars=true switch when starting IDE (can be included in netbeans.conf)



*** This issue has been marked as a duplicate of 121853 ***
Comment 2 jessholle 2008-05-03 22:23:33 UTC
Unfortunately this flag will not always suffice as per issue #12853.
Comment 3 vicricker 2008-05-07 17:48:57 UTC
Why does Netbeans not see/use the generated source code from the other project?

-J-DCacheClassPath.keepJars=true works but I don't think it's optimal.