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.
This is an exception that I get almost every day and I have no idea what do about this. This also prevents me from standardizing my team on netbeans instead of eclipse. I do not understand why nobody seems to do anything about this bug. I love netbeans but once this exception happens the whole refactoring module, code completion module just give wrong results and this has been a huge issue. If anyone actually starts working on this bug, you can contact me at pramod@pravaah.com and I can send across a whole bunch of log files, right now it seems there is no point. Pramod. javax.jmi.reflect.InvalidObjectException: Object with MOFID 681F75A0-A1C2-11DA-9AC6-8DE81326AA77:0000000000002A6E no longer exists, class: org.netbeans.jmi.javamodel.JavaClass$Impl at org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:359) at org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:48) at org.netbeans.mdr.handlers.InstanceHandler._handleGet(InstanceHandler.java:193) at org.netbeans.jmi.javamodel.JavaClass$Impl.getName(Unknown Source) at org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl.getSuperClass(JavaClassImpl.java:326) at org.netbeans.jmi.javamodel.JavaClass$Impl.getSuperClass(Unknown Source) at org.netbeans.modules.javacore.parser.MDRParser.getSuperClass(MDRParser.java:1452) at org.netbeans.modules.javacore.parser.Scope.getSuperClass(Scope.java:339) at org.netbeans.modules.javacore.parser.Scope.constructMemberTypeScope(Scope.java:130) at org.netbeans.modules.javacore.parser.Scope.createMemberTypeScope(Scope.java:120) at org.netbeans.modules.javacore.parser.Scope.constructMemberTypeScope(Scope.java:140) at org.netbeans.modules.javacore.parser.Scope.createMemberTypeScope(Scope.java:120) at org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:483) at org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:373) at org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:335) at org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:313) at org.netbeans.modules.javacore.parser.MDRParser.enterMembers(MDRParser.java:243) at org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.directUpdate(ResourceImpl.java:733) at org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.checkUpToDate(ResourceImpl.java:644) at org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.checkUpToDate(ResourceImpl.java:587) at org.netbeans.modules.javacore.jmiimpl.javamodel.SemiPersistentElement.checkUpToDate(SemiPersistentElement.java:263) at org.netbeans.modules.javacore.jmiimpl.javamodel.SemiPersistentElement.checkUpToDate(SemiPersistentElement.java:267) at org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl.getContents(JavaClassImpl.java:411) at org.netbeans.jmi.javamodel.JavaClass$Impl.getContents(Unknown Source) at org.netbeans.modules.javacore.jmiimpl.javamodel.FeaturesList.toArray(FeaturesList.java:101) at org.netbeans.modules.javacore.jmiimpl.javamodel.ParameterizedTypeImpl$WrapperList.toArray(ParameterizedTypeImpl.java:367) at org.netbeans.modules.editor.java.JMIUtils.findFeatures(JMIUtils.java:835) at org.netbeans.modules.editor.java.JMIUtils.findFeatures(JMIUtils.java:399) at org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.findFieldsMethodsAndInnerClasses(NbJavaJMICompletionQuery.java:1057) at org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.resolveExp(NbJavaJMICompletionQuery.java:285) at org.netbeans.modules.editor.java.NbJavaJMICompletionQuery.getResult(NbJavaJMICompletionQuery.java:57) at org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:139) at org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:74) at org.netbeans.modules.editor.java.JavaCompletionProvider$Query.query(JavaCompletionProvider.java:108) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:189) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Created attachment 29850 [details] The Message Log
It's probably caused by some incosistency in metadata. Deleting {userdir}/var/chace/mdrcache should help. But before deleting it, you can zip it and attach the archive (or post it to my mail if the archive is too big). It may help us to find the bug. There are already several reports about this strange behaviour, unfortunately we can not find the moment when the metadata gets corrupted, which makes bugfinding difficult. So any steps how to reproduce it from a fresh userdir are wellcome. Reassignig to java/javacore
Another time the issue just happened javax.jmi.reflect.InvalidObjectException: Object with MOFID 681F75A0-A1C2-11DA-9AC6-8DE81326AA77:0000000000002B31 no longer exists, class: org.netbeans.jmi.javamodel.JavaClass$Impl at org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:359) at org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:48) at org.netbeans.mdr.handlers.InstanceHandler._handleGet(InstanceHandler.java:193) at org.netbeans.jmi.javamodel.JavaClass$Impl.super_getTypeParameters(Unknown Source) at org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl.getTypeParameters(JavaClassImpl.java:425) at org.netbeans.jmi.javamodel.JavaClass$Impl.getTypeParameters(Unknown Source) at org.netbeans.modules.editor.java.NbJavaJMISyntaxSupport.getType(NbJavaJMISyntaxSupport.java:343) at org.netbeans.modules.editor.java.NbJavaJMISyntaxSupport.findType(NbJavaJMISyntaxSupport.java:145) at org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.resolveItem(NbJavaJMICompletionQuery.java:493) at org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.resolveExp(NbJavaJMICompletionQuery.java:258) at org.netbeans.modules.editor.java.NbJavaJMICompletionQuery.getResult(NbJavaJMICompletionQuery.java:57) at org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:139) at org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:74) at org.netbeans.modules.editor.java.JavaCompletionProvider$Query.query(JavaCompletionProvider.java:108) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:189) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Another datapoint that might help, if you have the kind of setup I am talking about (multiple projects with large jar files) the only way for me to make things work for sometime is to 1. delete the "var" directory. 2. start netbeans let it parse the classpath and then once it is done, exit out so that it saves the classpath ( If I work in the session which creates the new var directory I mess up the MOF repository) 3. start netbeans again and then let it reread the MOF repository and then work. Pramod.
Easy way to consistently reproduce this issue from a new userdir( I just did it 4 times in quick succession) 1. Delete old userdir. 2. Start Netbeans 3. New Project -> General (Java Application) 4. Any temp name/dir. Make sure you ask netbeans to create a main class. 5. This is very important - Before netbeans finishes parsing the classpath. Inside the main(String[] args) method of the new class enter "Class.forName(" - At this point hit Ctrl-Spacebar for code completion but before the code completion window appears hit enter and type any junk. Hit enter again and type some valid java code ( You have to be fast and do all this before the classpath parsing is done. 6. The little red error dot starts flashing indicating that you managed to mess up the MOF repository. If you have any issues reproducing this let me know at pramod@pravaah.com Thanks Pramod.
Let me also state that after you follow the steps I outlined previously and messed up your MDR you cannot even get code completion to give you a list of methods for the java.lang.String object in perfectly valid java code. such as String str = "ABC"; str. - At this point hit ctrl spacebar and you will not get anything. Pramod.
This looks like the root cause of issue 73679. We saw similar traces from Roman Strobl. The most strange Exceptions are these: java.lang.Exception: Class not found in index: java.util.HashMap.EntryIterator. Recovering... java.lang.Exception: Class not found in index: java.util.HashMap.EntrySet. java.lang.Exception: Class not found in index: java.lang.Class.MethodArray. Recovering... This is really strange, that classes from rt.jar (readonly) are not found in index. This needs to be evaluated. CCing Martin and Tomas, they could help.
We suspect, that prebuilt storage is somehow corrupted. Please try to delete netbeans/ide6/mdrstorage and let us know, if it helps. Thanks
deleting the prebuilt mdrstorage seems to have been the answer. Things work pretty well after that. I have not been able to simulate the issue following the steps I outlined and while using the system I have not had the issue again. I am just very gaurded in my response as I do not know if it will reappear. I report back in a week if I have any issues.
Created attachment 30056 [details] Another messages.log from psuchomel
Created attachment 30058 [details] Another log from rstrobl
I'm running into similar issues, that started with installing NetBeans 5.5 and then trying to use 5.0. However, deleting var/cache/* does not solve the problem - I get InvalidObjectExceptions immediately on startup. One curious log message - what does this mean? Using 'jar:file:/C:/Program%20Files/Java/jdk1.5.0_06/src.zip!/1.4.1' pre- parsed database!
This means it uses pre-parsed database created by installer. I did not look at it in detail but the mix of jdk1.5.0_06 directory and 1.4.1 version are strange. jar:file:/C:/Program%20Files/Java/jdk1.5.0_06/src.zip!/1.4.1'. Questions: - Did you install NetBeans from installer and did you use J2SDK 1.4.1. - Now do you run on JDK 1.5.0_06? If it is true, what exact builds of JDK did you use? (I have idea what can be wrong but I do not believe in it, just want to try to ensure it is not the case I think.)
*** Issue 74970 has been marked as a duplicate of this issue. ***
*** Issue 71325 has been marked as a duplicate of this issue. ***
Thanks to psuchome a thurka we have reproducoble test case: 1. Install NetBeans from installer in Pacific Timezone 2. Open several project do Find Usages, open several files 3. Shut down the IDE 4. Switch to Prague Timezone 5. Start the IDE do Find Usages, open several files - IOEs will be thrown
Problem with class not found in index fixed: Checking in ClassUpdater.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/ClassUpdater.java,v <-- ClassUpdater.java new revision: 1.13; previous revision: 1.12 done Rest if this report is duplicate of issue 73679
*** Issue 70055 has been marked as a duplicate of this issue. ***
*** Issue 72839 has been marked as a duplicate of this issue. ***
*** Issue 74219 has been marked as a duplicate of this issue. ***
Verified in 200606081800, can be merged to 5.5 branch.
Checking in ClassUpdater.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/ClassUpdater.java,v <-- ClassUpdater.java new revision: 1.11.34.1; previous revision: 1.11 done
Verified. NB 5.5 200606160200
Reorganization of java component