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 44672 - [refactoring] "AssertionError: Class not found in index: ..." from MDRParser.resolveSuperTypes
Summary: [refactoring] "AssertionError: Class not found in index: ..." from MDRParser....
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: issues@java
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2004-06-09 21:45 UTC by Jesse Glick
Modified: 2007-04-03 18:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (12.22 KB, text/plain)
2004-06-09 21:45 UTC, Jesse Glick
Details
Some more exceptions (13.81 KB, text/plain)
2004-06-09 21:52 UTC, Jesse Glick
Details
Yet more exceptions, making it hard to manually enter import statements (4.43 KB, text/plain)
2004-06-09 21:53 UTC, Jesse Glick
Details
Some more exceptions; might overlap -3.txt, it is getting hard to tell by now (37.10 KB, text/plain)
2004-06-09 22:00 UTC, Jesse Glick
Details
thread-dump (7.34 KB, text/plain)
2004-06-16 11:09 UTC, Lukas Hasik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-06-09 21:45:28 UTC
040609, 1.5.0 b54. I had opened a unit test in an
NBM project that was missing a bunch of imports,
which were correctly highlighted as errors. I
selected InstalledFileLocator (which a static
nested class was extending) and pressed Alt-I and
selected o.o.m.IFL and pressed Enter. The class
was imported correctly but I got an exception.
Comment 1 Jesse Glick 2004-06-09 21:45:56 UTC
Created attachment 15616 [details]
Stack trace
Comment 2 Jesse Glick 2004-06-09 21:51:24 UTC
Seems to happen each time I use Fast Import. And now it seems to have
deleted my existing import statements for some reason - except for one
which was in the class when I opened it. Looks like no usable Fast
Import in this build, anyway.

TestLogger, BTW, is a nested static class in the same file as I am
editing. There is nothing wrong with it that I can see, or that javac
reports (there are other missing imports in the class), but a line

private static final TestLogger LOGGER = new TestLogger();

was marked with an error highlight for a while saying that TestLogger
could not be found. But when I compile the file (giving some errors
for unrelated missing imports), that error highlight disappears.

Now doing Fast Import gives me a different exception!
Comment 3 Jesse Glick 2004-06-09 21:52:22 UTC
Created attachment 15617 [details]
Some more exceptions
Comment 4 Jesse Glick 2004-06-09 21:52:59 UTC
Now code completion in import statements just throws an exception too.
Comment 5 Jesse Glick 2004-06-09 21:53:52 UTC
Created attachment 15618 [details]
Yet more exceptions, making it hard to manually enter import statements
Comment 6 Jesse Glick 2004-06-09 21:54:27 UTC
Note that I have started deleting my whole MDR cache every time I
install a new dev build (usually once a day), so this is not an issue
of having a stale cache.
Comment 7 Jesse Glick 2004-06-09 21:56:02 UTC
The last exception there - "Object was deleted" - is now thrown every
time there is a background error parse, without trying to invoke code
completion or anything, just editing everything by hand.

Thinking about using Emacs again. :-(
Comment 8 Jesse Glick 2004-06-09 21:58:42 UTC
Exception is also thrown when pressing F9 to compile the file using
Ant, making the IDE essentially useless. Someone, maybe
RepositoryUpdater.fileChanged or else Filesystems, should be catching
such exceptions and logging them and not interrupting the caller
thread, which needs to complete.

In fact the exception is thrown when attempting to save the file using
Ctrl-S. I guess I will have to copy the contents to clipboard, close
without saving, and paste them back in using Emacs.
Comment 9 Jesse Glick 2004-06-09 22:00:30 UTC
Created attachment 15619 [details]
Some more exceptions; might overlap -3.txt, it is getting hard to tell by now
Comment 10 Lukas Hasik 2004-06-16 11:09:05 UTC
just tryed create new j2se project and got 
java.lang.AssertionError: Class not found in index: Main
	at
org.netbeans.modules.javacore.parser.MDRParser.resolveSuperTypes(MDRParser.java:1084)

and the ide hang on scanning project classpath ... will attach thread-dump
Comment 11 Lukas Hasik 2004-06-16 11:09:49 UTC
Created attachment 15743 [details]
thread-dump
Comment 12 psuk 2004-06-17 09:16:56 UTC
See also Issue 44952
Comment 13 Martin Matula 2004-06-17 13:28:45 UTC
The AssertionError will no longer occur now that I have added the
error recovery code. The following exceptions were probably caused by
the first one causing the index inconsistency. I am not able to
reproduce it.
Comment 14 Jiri Prox 2005-07-19 12:01:00 UTC
verified