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 29012 - Internal compiler gives "unable to access file: null"
Summary: Internal compiler gives "unable to access file: null"
Status: RESOLVED DUPLICATE of bug 29718
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC OS/2
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 28419 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-26 02:46 UTC by _ gtzabari
Modified: 2007-09-26 09:14 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 _ gtzabari 2002-11-26 02:46:48 UTC
dev build 200211210100
IBM JDK 1.3.1

  I get the following error when I try to compile
a file which refers to a package which does not
exist. If I switch from the internal compiler to
the external one, it compiles just fine. Looks
like a bug in the internal compiler.

net/jxta/content/ContentType.java [10:26] cannot
access net.jxta.security.ID
bad class file:
net\jxta\advertisement\ContentAdvertisement.class
unable to access file: null
Please remove or make sure it appears in the
correct subdirectory of the classpath.
Comment 1 Svata Dedic 2003-01-07 12:19:23 UTC
I wonder how it is possible that the external compiler compiles a
file, which "refers to a package which does not exist". Isn't that a
bug in the external compiler ?
Comment 2 _ gtzabari 2003-01-07 15:05:33 UTC
Actually no. This is a bug in Netbeans. I know as a matter of fact if
I run CLEAN ALL on my project a few times and *then* try the internal
compiler it will work.

There seems to be some sort of class caching problem or something in
Netbeans. Does the internal compiler cache the file dependency tree
when compiling?

That was one issue (which I guess was not reflected in my previous
message). The second issue is that very often the internal compiler
will give me a misleading error message as mentioned above whereas
javac will give me the correct message.
Comment 3 Svata Dedic 2003-01-14 08:56:56 UTC
OK, then. You wrote: "If I switch from the internal compiler to
the external one, it compiles just fine". How it could if there's a
reference to a non-existent package (net.jxta.content) ? The file must
not compile - even if the offending statement is "import" and the
imported identifier is not used anywhere.

What behaviour do you mean by "... *then* try the internal
compiler it will work" what exactly does the internal compiler ? Does
it compile the ContentType.java, even if it contains a reference to
unresolvable symbol (package) ?

There's indeed some caching, but caches are all flushed just before
compilation starts; they serve only for parsing.
Comment 4 Svata Dedic 2003-02-25 12:23:59 UTC
Gili, isn't this the same bug as described in issue #29718 ?
Comment 5 _ gtzabari 2003-02-26 01:30:00 UTC
Svatopuk, I am unsure if these two bugs are identical but since I did
not provide enough information and I *always* work off JavaFS it is
highly likely they are the same. Closing as DUPLICATE unless I see
evidence to the contrary.

*** This issue has been marked as a duplicate of 29718 ***
Comment 6 Svata Dedic 2003-02-26 08:33:35 UTC
OK, reopen if they are different. 
During testing of the other issue, I found that the compiler produces
several types of messages, depending at what stage it attempts to
access the locally removed file (I think that Bad class file + unable
to access was one of them). The internal compiler now simply ignores
those virtual files.
Comment 7 Svata Dedic 2003-02-28 16:27:58 UTC
*** Issue 28419 has been marked as a duplicate of this issue. ***