Community
Participate
Working Groups
When searching for a method reference in a java project I get this exception (bellow is the stack trace). Does not seam to be reproduceable in a predictable fashion, but it is not the first time I get this error. Once I get it I am keep getting the same error. Not even an eclipse restart sorts the problem. It seems that it only does it for the method that it originally generated the exception (other searches work fine), but it is not always the same method that causes this exception !ENTRY org.eclipse.core.jobs 4 2 2007-07-18 12:00:00.754 !MESSAGE An internal error occurred during: "Java Search". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.core.search.matching.MethodLocator.matchReportReference(MethodLocator.java:339) at org.eclipse.jdt.internal.core.search.matching.PatternLocator.matchReportReference(PatternLocator.java:407) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2060) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2466) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2213) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1559) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1037) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1078) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1199) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:217) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:502) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:550) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:143) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:94) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Did a complete wipe out of the ".metadata" folder from the workspace, but it does not sort the problem.
*** This bug has been marked as a duplicate of bug 166093 ***
Can you confirm that you're in the same context than bug 166093 (ie. targetting 1.4 runtime but compiling against JRE 1.5 or 1.6)?
So, can you provide a simple test case to reproduce or at least the pattern you use for the search? Also do you have unresolved types/methods while searching?
The method I tried to look up for references was one of my own. I could not provide you with the test case without giving you the whole project (and I am not sure how to write a test case for this, because I can not reproduce it). All I can say about it that the method was referenced from my project by other methdos, and it was a private method. I am not sure what do you mean by "Also do you have unresolved types/methods while searching?"
(In reply to comment #5) > I am not sure what do you mean by "Also do you have unresolved types/methods > while searching?" > Do you have any compilation error in your workspace while doing the search? If not, do you have some projects with a specific 1.4 compliance in your workspace?
There are compilation errors in the workspace, but no java 1.4 compliances
Thanks for the feedback. So, I finally consider this bug as a real duplicate of bug 166093, even if the origin of the error is not exactly the same... *** This bug has been marked as a duplicate of bug 166093 ***
Verified for 3.4M1 using build I20070802-0800.