Community
Participate
Working Groups
right click on a method of class shown in the package explorer throws the following exception: An internal error occurred during: "Java Search". java.lang.StringIndexOutOfBoundsException: String index out of range: -2 java.lang.String.substring(Unknown Source) org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName(PossibleMatch.java:107) org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init>(PossibleMatch.java:40) org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:872) org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) org.eclipse.jdt.core.search.SearchEngine.findMatches(SearchEngine.java:468) org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:757) org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:125) org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:83) org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
In order to help us to reproduce the problem, please provide some more information: - build you're using - does it happen on each method of any class in Package Exlplorer or only on specific ones? - if specific ones, then attach class(es) which contain(s) failing method(s)
hi sorry i forgot to provide the conditions, but the problem occured when i am setting up with the left hand the linux box and with the right hand i worked on my java project. Version: 3.0.0 Build id: 200406251208 the problem occurs only when i search references for the method: public void setCursor(MultilineTextPosition pos) hope this helps. best regards benny
Unfortunately this method seems not to be in Eclipse 3.0 code. I cannot find MultilineTextPosition class... If this is a piece of your code, I need a complete example to help me to reproduce this problem, thanks Another question, could you have a try with 3.0.1 build and let us know if this problem also occurs with this build?
I've had this problem with I20041013 (3.1.0 stream). I was searching for declarations of a method in the workspace. !ENTRY org.eclipse.core.runtime 4 2 Nov 01, 2004 11:52:19.279 !MESSAGE An internal error occurred during: "Java Search". !STACK 0 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName(PossibleMatch.java:109) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init>(PossibleMatch.java:41) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:911) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.core.search.SearchEngine.findMatches(SearchEngine.java:472) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:761) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:125) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:83) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Which kind of method? A specific one or an existing of rt.jar library or eclipse plugins? If this is a specific method (ie. one of your projects in your workspace or your own librairies...), would it be possible to have a sample example to help us to reproduce this exception? Thanks
I can reproduce this in 200411042000 in my development workspace by searching for references to Object#clone() from a jdk1.5.0 rt.jar. My workspace has compiler compliance level 1.4 and a j9 vm as default jre. I have several project configured with jdk1.5.0. However, I could not reproduce it in a fresh workspace so far.
Search for declarations of clone() gives the same problem, but only after many matches have been reported. Reference search fails immediately. Frederic, please contact me if you want me to debug something with my dev workspace (where I can reliably reproduce it).
Thanks Markus for the inputs. I'll jave a look on them next week and let you know if I need your workspace...
OK, I got it looking for declaration of clone() using rt.jar 1.5. Thanks Markus for your efficient help on this :-)
Here a simple scenario to reproduce this problem: 1) Open a workspace using Sun JRE 1.5.0 2) Set workspace default VM to 1.5.0 3) Create new project and create following class: X.java: public class X { Object foo() throws CloneNotSupportedException { return this.clone(); } } 4) select clone method in statement: return this.clone(); 5) Search for declaration of this method in Workspace Then, you get Java Search error dialog: An internal error occured during: "Java Search".
Fixed. It seems that some class file has a source file name without ".java" extension. Protect qualified name construction from this... [jdt-core-internal] Changes done in PossibleMatch#getQualifiedname() No test case added, just verify that no error occurs while executing comment 10 scenario...
*** Bug 78452 has been marked as a duplicate of this bug. ***
*** Bug 79975 has been marked as a duplicate of this bug. ***
Verified in 200412140800
*** Bug 81916 has been marked as a duplicate of this bug. ***
*** Bug 136710 has been marked as a duplicate of this bug. ***