Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 40947 - Source locator does not exist error
Summary: Source locator does not exist error
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Incubator (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: User Unknown CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 40949 47774 48515 49086 83787 102274 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-30 10:24 EDT by David Whiteman CLA
Modified: 2005-09-27 09:12 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Whiteman CLA 2003-07-30 10:24:08 EDT
This morning when I started my Eclipse M1 workspace, I accidentally started it
twice.  I realize that is a separate bug report for Linux-GTK, since you're not
supposed to be able to do that.  However, I did do it, and I quickly closed one
of the workspaces and began work on the other one.

Apparently, this brief period of having the same workspace open twice hosed
something in my metadata.  When I try to launch anything in the workspace, I get
the following error (copied from the .log):

!ENTRY org.eclipse.debug.ui 4 120 Jul 30, 2003 10:14:57.29
!MESSAGE Error logged from Debug UI:
!STACK 1
org.eclipse.core.runtime.CoreException: Source locator does not exist:
org.eclipse.jdt.debug.ui.javaSourceLocator
        at
org.eclipse.debug.internal.core.LaunchManager.newSourceLocator(LaunchManager.java:1101)
        at
org.eclipse.debug.internal.core.LaunchConfiguration.initializeSourceLocator(LaunchConfiguration.java:180)
        at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:155)
        at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:732)
        at org.eclipse.debug.ui.DebugUITools.buildAndLaunch(DebugUITools.java:550)
        at org.eclipse.debug.ui.DebugUITools$2.run(DebugUITools.java:499)
        at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
!ENTRY org.eclipse.debug.core 4 5013 Jul 30, 2003 10:14:57.29
!MESSAGE Source locator does not exist: org.eclipse.jdt.debug.ui.javaSourceLocator

This is a big problem for me since I just recently had to rebuild my workspace,
and I don't want to do it again.  Can this problem be avoided with code, if the
same workspace happens to be opened multiple times?  Is there a way I can hack
my metadata to get around the problem?
Comment 1 Darin Wright CLA 2003-07-30 10:32:19 EDT
Does your Eclipse runtime contain the org.eclipse.jdt.debug.ui plug-in? It 
looks like it is missing (I don't think this has to do with double-starting a 
workspace).
Comment 2 David Whiteman CLA 2003-07-30 10:38:54 EDT
*** Bug 40949 has been marked as a duplicate of this bug. ***
Comment 3 David Whiteman CLA 2003-07-30 10:39:54 EDT
Yes, it contains that directory in the eclipse plugins directory.  It certainly
had to exist yesterday, as this workspace was fully functional when I left the
office last evening.  Only after the double start did it start flaking out.
Comment 4 Darin Wright CLA 2003-07-30 10:48:35 EDT
The error message indicates a contributed source locator extension cannot be 
found (i.e. contributed by java.debug.ui to the debug platform). Can you zip up 
your workspace and place it somewhere that I can FTP it (e-mail me the ftp 
site)?
Comment 5 David Whiteman CLA 2003-07-30 10:50:49 EDT
Ok, I'll send you the workspace in a few minutes.

FWIW, there are other problems that surfaced as well, apparently as the result 
of the double start.  When I click on Run... to open up the launch configs 
window, I get this error:


!ENTRY org.eclipse.debug.ui 4 120 Jul 30, 2003 10:41:50.782
!MESSAGE Error logged from Debug UI: 
!STACK 1
org.eclipse.core.runtime.CoreException: No tab group defined for launch 
configuration type org.eclipse.jdt.launching.localJavaApplication
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPresentati
onManager.getTabGroup(LaunchConfigurationPresentationManager.java:134)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi
ewer$5.run(LaunchConfigurationTabGroupViewer.java:675)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi
ewer.createGroup(LaunchConfigurationTabGroupViewer.java:690)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi
ewer.showInstanceTabsFor(LaunchConfigurationTabGroupViewer.java:592)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi
ewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:486)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi
ewer.inputChanged(LaunchConfigurationTabGroupViewer.java:458)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi
ewer.setInput(LaunchConfigurationTabGroupViewer.java:438)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.ha
ndleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:856)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$2.
selectionChanged(LaunchConfigurationsDialog.java:628)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:1006)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged
(Viewer.java:157)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection
(StructuredViewer.java:1290)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection
(StructuredViewer.java:1020)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:362)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.do
InitialTreeSelection(LaunchConfigurationsDialog.java:388)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.in
itializeContent(LaunchConfigurationsDialog.java:329)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.cr
eateContents(LaunchConfigurationsDialog.java:324)
	at org.eclipse.jface.window.Window.create(Window.java:302)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.cr
eate(LaunchConfigurationsDialog.java:1794)
	at org.eclipse.jface.window.Window.open(Window.java:552)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.op
enDialogOnSelection(LaunchConfigurationsDialog.java:491)
	at 
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.op
en(LaunchConfigurationsDialog.java:445)
	at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:381)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at 
org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup
(DebugUITools.java:385)
	at 
org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup
(DebugUITools.java:327)
	at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run
(OpenLaunchDialogAction.java:79)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:542)
	at org.eclipse.jface.action.ActionContributionItem.access$4
(ActionContributionItem.java:496)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent
(ActionContributionItem.java:468)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1735)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1527)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1399)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1382)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:858)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.debug.ui 4 120 Jul 30, 2003 10:41:50.784
!MESSAGE No tab group defined for launch configuration type 
org.eclipse.jdt.launching.localJavaApplication
Comment 6 Darin Wright CLA 2003-07-30 10:54:55 EDT
Again, this is contributed by the java.debug.ui. Something is wrong with the 
extensions - they are not being found.
Comment 7 David Whiteman CLA 2003-07-30 11:24:11 EDT
I don't have an FTP server, but you should be able to get to this URL within 
IBM.  Warning: the file is 30mb.

http://www.ral.oti.com/teams/bbAWT/drops/out/temp/dlwWorkspace.zip
Comment 8 Darin Wright CLA 2003-07-30 12:06:51 EDT
The file does not include the ".metadata" folder.
Comment 9 David Whiteman CLA 2003-07-30 12:15:42 EDT
Rats.... I zipped up the directory with:

zip -r dlwWorkspace.zip *

while I was in the top level workspace directory.  Do you know of any other 
command line args I need for it to include .metadata?  Perhaps -X?
Comment 10 Darin Wright CLA 2003-07-30 12:21:24 EDT
Sorry, I just use Winzip :-)
Comment 11 David Whiteman CLA 2003-07-30 12:34:00 EDT
OK, please try the following URL to get the metadata files:

http://www.ral.oti.com/teams/bbAWT/drops/out/temp/dlwMetadata.zip
Comment 12 Darin Wright CLA 2003-07-30 12:47:41 EDT
The source locator is found when I launch a configuration. Does the problem 
exist after a workspace restart? (I assume you've tried that).
Comment 13 David Whiteman CLA 2003-07-30 12:53:34 EDT
Yes, I tried restarting.  Does is make a difference that I'm running M1 on 
Linux-GTK?
Comment 14 Darin Wright CLA 2003-07-30 13:14:09 EDT
When you start the workspace, and do:

Help > About Eclispe Platform > Plug-in Details

Does org.eclipse.jdt.debug.ui appear in the table?
Comment 15 David Whiteman CLA 2003-07-30 13:18:54 EDT
yes, it does appear in the table
Comment 16 Darin Wright CLA 2003-07-30 13:22:28 EDT
DJ, do you know of any reason that extensions might go missing? (I can't figure 
this one out).
Comment 17 DJ Houghton CLA 2003-07-30 14:25:15 EDT
Not sure...maybe something funky happened with the registry cache when it was 
written out by the second Eclipse instance? So the plug-in appears in the file 
system but Eclipse doesn't see it in the registry?

What happens if you delete the .metadata/.registry file and then start up 
Eclipse?
Comment 18 David Whiteman CLA 2003-07-30 15:39:07 EDT
Must be some validity to your theory, since deleting the .registry file seems 
to get the workspace working again.  Thanks!
Comment 19 Darin Wright CLA 2003-07-30 15:45:23 EDT
This was not a "debug" issue. Moving to core (maybe this can be closed).
Comment 20 David Whiteman CLA 2003-07-30 15:52:01 EDT
I'm not sure if the bug is closeable.  My problem has a workaround, but the 
question is how does the registry get corrupted, and how can it easily fix 
itself.  I believe this is the 2nd time this has happened to me because of 
actually starting multiple workspaces, and I doubt I will be the only one.
Comment 21 John Arthorne CLA 2003-07-30 17:35:37 EDT
Maybe related to 40944... This is the second report of a corrupt registry cache
in a short period.  We have not changed code recently in this area though...
Comment 22 Josh Rehman CLA 2003-08-25 16:22:53 EDT
I have had almost exactly the same experience; only in my case, Eclipse crashed 
during a debug session, I killed it (with xkill) and when I started up again I 
got the same symptom. I, too am running with Linux GTK. I posted to the jdt 
newsgroup and they kindly pointed me to this bug. This may have been 
a "stealth" dual eclipse execution (xkill may not have elminated the core 
Eclipse runtime) but I am unable to reproduce the problem in this way.

I tried the workaround, and it works! However there is definitely something 
fishy going on if the registry can be so easily corrupted, and I would 
recommend against closing this bug.

Thanks!
Comment 23 David Corbin CLA 2003-08-26 10:05:47 EDT
I had a co-worker experience this problem when trying to run Junit.  Removing
the .registry file did bypass the problem.  I asked, but he could not confirm
for SURE that he had tried running two instances of eclipse, but he did think it
possible that he'd tried that.
Comment 24 Björn Pusch CLA 2003-09-09 08:58:00 EDT
I experienced the same error after running a session with two windows.
Deleting the .registry file fixed it
Comment 25 Vance T. Miller CLA 2003-10-11 21:22:25 EDT
I had this same problem. And it was definately the result of launching eclipse 
twice. version 2.1 on WindowsXP.
Comment 26 Lorenz H. CLA 2003-11-30 19:10:09 EST
*** Bug 47774 has been marked as a duplicate of this bug. ***
Comment 27 Martin Solum CLA 2003-12-07 12:34:48 EST
Same story for me, running Windows 2000, openned twice by accident, got source 
locator error when trying do launch anything, when trying to run get no tab 
group error.  Renamed .registry .registry.bak, everything seems fine.  
Comment 28 Missing name CLA 2003-12-09 18:46:24 EST
Similar story here.  I did run more than one instance by mistakes since 
sometimes the splash screen takes a little too long to come up even on my 
machine and I click again.  The source locator problem happened twice so far, 
here is how the problem progresses for me:

1- ClassNotFoundException starts appearing when debugging for only one class 
(not sure what's the pattern there but seems like any class can be a good 
candidate)
2- ClassNotFoundException spreads everywhere, and every time I try to debug 
something it will start and the class loader will throw the exception.  Even if 
I start a new project with one class and one main method.  
3- Can't even start the debugging because I get a source locator not found 
error.  Note that even at this point I can run anything with no problem but no 
debugging.

The .registry fix didn't do it for me, but I luckily keep backup of everything 
so I was able to rollback to a configuration that worked.  I was too lazy to 
recreate my workspace.  I did play around for a bit after with my non working 
workspace and thought that maybe removing and installing a plugin again made it 
work.  I am not certain since I played around with so many things I would have 
to do it again more methodically.  Bottom line I was able to fix the non 
working workspace somehow but not with the .registry fix.  The problem happened 
again today so I thought maybe that the state of my workspace on my backup is 
just before being broken.  I used an earlier backup then the first time and 
things are working so far.  This never happened before this week and for me 
started with 2.1.2, I would have to try my non working workspace with previous 
versions and see what happens.
Comment 29 John Arthorne CLA 2003-12-17 17:44:02 EST
*** Bug 49086 has been marked as a duplicate of this bug. ***
Comment 30 John Arthorne CLA 2003-12-17 17:50:21 EST
*** Bug 48515 has been marked as a duplicate of this bug. ***
Comment 31 Hanan Galmor CLA 2004-01-05 18:15:11 EST
Same bug happend to me - I opened ECLIPSE twice and then closed one window.
now when I try to lanuch a program it gives me an error:
Source locator does not exist org.eclipse.jdt.debugui.javasourcelocator
I checked the plugins details and it actually does not appear there.
Comment 32 Hanan Galmor CLA 2004-01-05 18:43:12 EST
The solution for me was to delete the workspace (after backingup my programs 
offcourse) and the firing up Eclipse and let it build the workspace from 
scratch.
after doing that everything went back to normal and I was able to run my 
programs again.
Comment 33 Brandon Dove CLA 2004-02-18 15:45:50 EST
I experienced this same problem using M5 on WinXP today *except* it *was not* a
result of attempting to start a second instance of Eclipse. I'd been using the
tool all day and went to run a JUnit and recevied the error:

Source locator does not exist: org.eclipse.jdt.debug.ui.javaSourceLocator

I don't seem to have a .registry file in workspace/.metadata/ so the suggested
workaround of deleting it is of little help. 
Comment 34 Brandon Dove CLA 2004-02-18 16:22:57 EST
Located my and deleted my .registry file from eclipse/.config/ and problem is
resolved.
Comment 35 Elizabeth CLA 2004-03-15 12:14:41 EST
Same thing, registry corrupted at shutdown of second Eclipse.

Linus-GTK, i386 running (among other things)
org.eclipse.help.appserver (2.1.0) "Help Application Server"
org.eclipse.help.ui (2.1.1) "Help System UI"
org.eclipse.help.webapp (2.1.2) "Help System Webapp"
org.eclipse.jdt (2.1.2) "Eclipse Java Development Tools"
org.eclipse.jdt.core (2.1.2) "Java Development Tools Core"
org.eclipse.jdt.debug (2.1.2) "JDI Debug Model"
org.eclipse.jdt.debug.ui (2.1.1) "JDI Debug UI"

errors included:
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.runtime".
!MESSAGE Plug-in "org.eclipse.update.ui" was unable to instantiate class
"org.eclipse.update.internal.ui.views.UpdatesView".
!MESSAGE Source locator does not exist: org.eclipse.jdt.debug.ui.javaSourceLocator
!MESSAGE Missing project nature class for org.eclipse.jdt.core.javanature.

These were all fixed by moving .registry to .registry.bak

Errors resolved and a correct .registry was built at shutdown.

Comment 36 Pascal Rapicault CLA 2004-05-20 18:08:44 EDT
In previous eclipse registry registration was indeed possible, if a workspace
was shared. What would have happened is:
Eclipse1 starts, read the registry (read lazily the registry keeping references
to positions in the .registry file)
Eclipse2 starts, read the registry (read lazily by default)
Eclipse2 shutdown, the registry is rewritten
Eclipse1 tries to load an extension goes to the registry file with the position
read initially and bails because the info has moved.

In the 3.0 stream this has been fixed.
Comment 37 Darin Wright CLA 2005-01-26 21:06:35 EST
*** Bug 83787 has been marked as a duplicate of this bug. ***
Comment 38 Darin Wright CLA 2005-06-30 12:16:05 EDT
*** Bug 102274 has been marked as a duplicate of this bug. ***