Community
Participate
Working Groups
This bug related (if not causing) bugzilla 53052. Steps to reproduce: ------------------- 1. Start Eclipse in a new workspace. 2. Create a new Java project. 3. Create the three java files (in the appropriate package) described in bugzilla 53052. 4. Click Search -> Search. 5. Select "Java Search", then enter: Search string: "run()" (no quotes) Search for: method Limit to: Declarations Scope: workspace ... then click the Search button. An error window appears, with title "Error Running Jobs". The body of the window says: "ERROR: Search for Declarations: An internal error occurred during: "Search for Declarations"." This is the contents of the .log file... !SESSION Apr 12, 2004 16:01:03.719 --------------------------------------------- java.fullversion=J2RE 1.4.2 IBM Windows 32 build cndev-20040322 (JIT enabled: jitc) BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US !ENTRY org.eclipse.core.runtime 4 2 Apr 12, 2004 16:01:03.766 !MESSAGE An internal error occurred during: "Search for Declarations". !STACK 0 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java(Compiled Code)) at org.eclipse.jdt.internal.core.SourceMapper.findSourceFileName (SourceMapper.java:862) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getSourceFileName (PossibleMatch.java:123) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName (PossibleMatch.java:98) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init> (PossibleMatch.java(Inlined Compiled Code)) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java(Compiled Code)) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches (JavaSearchParticipant.java(Compiled Code)) at org.eclipse.jdt.internal.core.search.pattern.InternalSearchPattern.findMatches (InternalSearchPattern.java(Compiled Code)) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:739) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:707) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run (JavaSearchQuery.java:114) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run (InternalSearchUI.java:68) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:62)
*** Bug 53052 has been marked as a duplicate of this bug. ***
Created attachment 9407 [details] Test case I tried to reproduce using latest integration build without success. Could you please try to reproduce using the attached test case? If you can reproduce, please specify your Eclipse build. Thanks.
I just reproduced the problem with the attached test case, using the 20040331_1308 WSWB 3.0M8 build (Hyades is broken when used with Eclipse M9). I did a little more digging, and it appears that this problem *is* in the 3.0 M8 stable build, but is *not* in the I20040407 M9 build. I can only guess that someone has already fixed this problem in another bug... In light of this, I think we should wait until Hyades works with M9, and will try again. Thanks in advance.
Closing for now. Please reopen if you can reproduce.
I'm getting the same on RC2.
Was about to open new bug. This will not let me click reopen. (Not my creation?) Like the technique to find based on return type (Enter "* String", select method and definition). Tried it today to see if I could find return values of String[], but it failed. Reproduced several times but was in my target eclipse. Reproduced in base RC2 eclipse without the array portion. Search did find the hit, was looking for and answer of getDefault() where this was the method for a specific plugin and the return value was that plugin class. But search also failed, just as it did in my target system test as well. Seems to fail anytime I use the Hints/Tips documented technique for finding a method by return type. An internal error occurred during: "Java Search". java.lang.StringIndexOutOfBoundsException at java.lang.Throwable.<init>(Throwable.java) at java.lang.String.substring(String.java) at org.eclipse.jdt.internal.core.SourceMapper.findSourceFileName (SourceMapper.java) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getSourceFileName (PossibleMatch.java) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName (PossibleMatch.java) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init> (PossibleMatch.java) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java:855) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches (JavaSearchParticipant.java:94) at org.eclipse.jdt.core.search.SearchEngine.findMatches (SearchEngine.java:468) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:757) 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)
Reopening to investigate.
I suspect that the condition to get this problem depends on the JRE that is on the build path. Can you please indicate which JRE is on the build path and its version ?
*** This bug has been marked as a duplicate of 67600 ***
JRE Info java.assistive=ON java.awt.fonts= java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment java.awt.printerjob=sun.awt.windows.WPrinterJob java.class.path=E:\Eclipse-3.0\RC2\eclipse\startup.jar java.class.version=48.0 java.compiler=j9jit21 java.ext.dirs=e:\eclipse-3.0\jre\lib\ext java.fullversion=J2RE 1.4.2 IBM J9 build 20040519 (JIT enabled) java.home=e:\eclipse-3.0\jre java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ java.library.path=e:\eclipse-3.0\jre\bin;.;e:\eclipse-3.0\jre\bin;C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32 \Wbem;C:\Program Files\IBM\Infoprint Select;C:\Utilities;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;C:\Notes;C:\Infoprint; java.runtime.name=J9 - VM for the Java(TM) platform java.runtime.version=2.1 java.specification.name=Java Platform API Specification java.specification.vendor=Sun Microsystems Inc. java.specification.version=1.4 java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory java.vendor=IBM Corporation java.vendor.url=http://www.ibm.com/ java.version=1.4.2 java.vm.info=J2RE 1.4.2 IBM J9 build 20040519 (JIT enabled) java.vm.name=IBM J9SE VM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=IBM Corporation java.vm.version=2.1 jxe.current.romimage.version=6 jxe.lowest.romimage.version=6 line.separator=
Thanks. So this is the same problem as bug 67600.