Community
Participate
Working Groups
I get the following NPE while trying to search for all the references of a specific message in the workspace. I'm using Eclipe 2.1 and IBM SR2. My workspace contains all Eclipse as source loaded from CVS but I've had this for about a week with no problems so far. java.lang.reflect.InvocationTargetException: java.lang.NullPointerException at java.lang.String.<init>(String.java(Compiled Code)) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java (Compiled Code)) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java (Compiled Code)) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java (Compiled Code)) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java (Compiled Code)) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java (Compiled Code)) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java (Compiled Code)) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype (ClassScope.java:789) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperInterfaces (ClassScope.java:627) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchyWithoutM embers(ClassScope.java:704) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.detectCycle (ClassScope.java:769) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype (ClassScope.java:825) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperInterfaces (ClassScope.java:627) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy (ClassScope.java:676) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarc hy(CompilationUnitScope.java:252) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings (LookupEnvironment.java:170) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings (LookupEnvironment.java:198) at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.accept (MatchLocator2.java:129) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType (LookupEnvironment.java:103) at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage (PackageBinding.java:173) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findOnDemandImport (CompilationUnitScope.java:363) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleTypeImpo rt(CompilationUnitScope.java:422) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports (CompilationUnitScope.java:307) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes (CompilationUnitScope.java:349) at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.process (MatchLocator2.java:964) at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.locateMatches (MatchLocator2.java:677) at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.locateMatches (MatchLocator2.java:635) at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.locateMatches (MatchLocator2.java:851) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:471) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:400) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:90) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:71) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:85) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)
It looks like the problems are much deeper than just searching. Rebuilding fails with the same NPE.
This sounds like bug 35831 which is a jit bug. Could you please try the patch at http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core- home/patches/org.eclipse.jdt.core_2.1.1.zip?
I worked around the problem by deleting the index files from org.eclipse.jdt.core. If the problem happens again, I'll try the patch.
The index files have nothing to do with this stack trace. Glad it did affect the overall JIT behavior, but original problem is a duplicate of bug 35831
*** This bug has been marked as a duplicate of 35831 ***