Adverts

I recently got to the point of pulling my hair out with Eclipse when on of the most useful features just upped and died. I first noticed that Java searching had failed when I tried to do a reference search and got back the error message:

An internal error occurred during: "Java Search"

with no details or any helpful advice regarding fixing the problem. My usual trick of restarting Eclipse didn't fix the problem. A look in the log file showed the following stack trace but lets face it that is no more use than the error message:

!ENTRY org.eclipse.core.jobs 4 2 2006-11-07 16:34:53.275
!MESSAGE An internal error occurred during: "Java Search".
!STACK 0
java.lang.IllegalArgumentException: Class file name must end with .class
	at org.eclipse.jdt.internal.core.PackageFragment.getClassFile(PackageFragment.java:180)
	at org.eclipse.jdt.internal.core.util.HandleFactory.createOpenable(HandleFactory.java:116)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1159)
	at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:212)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:490)
	at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:538)
	at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:143)
	at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:93)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

I am indebted to a collegue for the solution to this problem and here it is: he guessed that some how Eclipse had corrupted something in the classes it had automatically build. I performed a clean which didn't fix the problem but I was ready to try just about anything so I closed Eclipse and deleted the built classes by hand. Upon restarting Eclipse Java search started working again. Quite what went wrong and why a clean didn't fix it I don't know.

Adverts

Donate and Help

Please support this site and
Bandwidth doesn't grow on trees y' know :o)

Adverts

Get Adsense