InvalidObjectException after source code editing

I'm using JSE8 build number 051011_2

I was editing a java source file in a project (a project I had been working on for a few weeks with no problems) a few days ago and the code I was entering seemed to really confuse the syntax highlighter. I deleted the code. However, I started getting these error message alert boxes popping up every few seconds claiming "Invalid Exception" etc.. Well, I finally had to delete the whole class file and recreate it. The errors stopped popping up over and over again, but now every time I open that project I get a single error alert box that goes away after I click it. Everything works fine (at least I think) from there on. The details of the error are are pasted below. Fortunately, it's not a show stopper, but I'd like to know if this is a known issue and if there is some workaround for it.

javax.jmi.reflect.InvalidObjectException: Object with MOFID 68244FB2-0D56-11DB-9E2F-38B1B7B2AA77:00000000000009E1 no longer exists.

at org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java :353)

at org.netbeans.mdr.storagemodel.AttrCollection.clearAttribComposite(AttrCollectio n.java:268)

at org.netbeans.mdr.storagemodel.AttrCollection$AttrIterator.remove(AttrCollection .java:295)

at org.netbeans.mdr.handlers.AttrCollWrapper$AttrIteratorWrapper.remove(AttrCollWr apper.java:185)

at org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl._delete(JavaClass Impl.java:1050)

at org.netbeans.mdr.handlers.InstanceHandler.refDelete(InstanceHandler.java:306)

at org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl._delete(ResourceIm pl.java:1275)

at org.netbeans.mdr.handlers.InstanceHandler.refDelete(InstanceHandler.java:306)

at org.netbeans.modules.javacore.scanning.FileScanner.removeFromRepository(FileSca nner.java:195)

at org.netbeans.modules.javacore.scanning.FileScanner.scan(FileScanner.java:180)

at org.netbeans.modules.javacore.JMManager.scanFiles(JMManager.java:1058)

at org.netbeans.modules.javacore.JMManager.resolveCPRoot(JMManager.java:963)

at org.netbeans.modules.javacore.JMManager.resolveCodebases(JMManager.java:777)

at org.netbeans.modules.javacore.JMManager$2.run(JMManager.java:731)

at org.openide.util.Task.run(Task.java:189)

at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:721)

[2506 byte] By [Skrelton] at [2007-11-26 8:51:38]
# 1
Sometimes this happens. Unfortunately. The workaround is to remove the MDR cache from your userdir, it's in the var/cache subdirectory. Thus stop the IDE, delete the cache and start the IDE. The classpath will be reparsed and thus be brought back to sync.
KSorokin at 2007-7-6 22:43:54 > top of Java-index,Development Tools,Java Tools...
# 2

Hi, thanks for the reply.

I just want to confirm what I'm supposed to delete. (By the way, my system runs Windows XP).

There is a folder .jstudio\Ent8\var\cache

The folder contains the following:

mdrstorage (a folder )

all-layers.dat

all-manifests.dat

folder-lookup.ser

layer-stamp.txt

lookup-stamp.txt

Do I delete the mdrstorage folder and the five files?

Thanks

Skrelton at 2007-7-6 22:43:54 > top of Java-index,Development Tools,Java Tools...
# 3
IIRC I used to delete the "var" folder completely, however deleting "cache" would be enough. So, yes, the "mdrstorage" folder and the five files.
KSorokin at 2007-7-6 22:43:54 > top of Java-index,Development Tools,Java Tools...
# 4
I wanted to follow up on this:I deleted the folder and five files and that cleared up the problem!Thanks!
Skrelton at 2007-7-6 22:43:54 > top of Java-index,Development Tools,Java Tools...
# 5

Hi everyone I am just reactiving this topic.

It has been few days that my netbeans has started to make the same error and I have followed the instructure of this Thread. For 2-3 days it was working perfectly but again today I start getting the same error, I have deleted more than 3 times the cashe in the var. each time while I have not made an error in my codes its going fine but as soon as I have an error the InvalidObjectException is shown again.

Does anybody have any idea what is solution to get rid of this error b'cos its going on my nerve now... :(

Thanx alot for your help...

pishi13 at 2007-7-6 22:43:54 > top of Java-index,Development Tools,Java Tools...
# 6
Can u try running the ide with a fresh userdir altogether? (Apart from the mdr cache, there could be some other broken info in the current user directory that is leading to this problem...)
KarthikR at 2007-7-6 22:43:54 > top of Java-index,Development Tools,Java Tools...
# 7
Thanx, Actually for the moment the problem is solved by deleting that folder.. we shall see.. Hope that does not happen again :)Thanx any way
pishi13 at 2007-7-6 22:43:54 > top of Java-index,Development Tools,Java Tools...