Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366356

Summary: Exception while trying to launch an Ant build
Product: [Eclipse Project] Platform Reporter: Mauro Molinari <mauromol>
Component: AntAssignee: Platform-Ant-Inbox <platform-ant-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: Michael_Rennie, Olivier_Thomann
Version: 3.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
The launch configuration on which the error happened none

Description Mauro Molinari CLA 2011-12-12 02:28:46 EST
Today I tried to launch an Ant build with an External Tools launch configuration and I got the following exception. Please note that when I tried to launch, the IDE was still building, so the user operation was enqueued, because Eclipse was building the workspace. Then, validation of XML files started and only after this operation had finished the launching was attempted.
Other two operations I saw were in queue before this one were "Convert legacy project" (although I don't have any "legacy" project in my workspace) and "Linking selection with editor", but I don't know if they were completed before the launch started or not.

org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at org.eclipse.jdt.launching.JavaRuntime.newRuntimeClasspathEntry(JavaRuntime.java:708)
	at org.eclipse.jdt.launching.StandardClasspathProvider.recoverRuntimePath(StandardClasspathProvider.java:100)
	at org.eclipse.jdt.launching.StandardClasspathProvider.computeUnresolvedClasspath(StandardClasspathProvider.java:65)
	at org.eclipse.ant.internal.launching.launchConfigurations.AntClasspathProvider.computeUnresolvedClasspath(AntClasspathProvider.java:48)
	at org.eclipse.jdt.internal.launching.RuntimeClasspathProvider.computeUnresolvedClasspath(RuntimeClasspathProvider.java:53)
	at org.eclipse.jdt.launching.JavaRuntime.computeUnresolvedRuntimeClasspath(JavaRuntime.java:1215)
	at org.eclipse.ant.internal.launching.AntLaunchingUtil.getCustomClasspath(AntLaunchingUtil.java:240)
	at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:214)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Olivier Thomann CLA 2011-12-12 09:03:14 EST
Moving to Platform/Ant. Might belong to JDT/Debug
Comment 2 Michael Rennie CLA 2011-12-12 12:00:56 EST
Looks like we are failing to parse the classpath from the launch configuration. Mauro, can you attach the launch configuration you were trying to launch?
Comment 3 Mauro Molinari CLA 2011-12-12 12:31:16 EST
(In reply to comment #2)
> Mauro, can you attach the launch configuration you were trying to launch?

Hi Micheal, I'm going to attach it. However, please note that the error does not happen always. It seems like it was something like a concurrency problem.
Comment 4 Mauro Molinari CLA 2011-12-12 12:32:14 EST
Created attachment 208274 [details]
The launch configuration on which the error happened
Comment 5 Michael Rennie CLA 2011-12-12 13:15:32 EST
(In reply to comment #4)
> Created attachment 208274 [details]
> The launch configuration on which the error happened

Thanks for attaching the configuration. There is nothing wrong with the configuration, and the exception means that we are calling the parse method on the same Parser object once a parse has already begun.

Looks like we could use some synchronization on the shared XML parser we have in LaunchingPlugin (see LaunchingPlugin#getParser())
Comment 6 Lars Vogel CLA 2019-11-27 07:40:09 EST
This bug hasn't had any activity in quite some time. Maybe the problem got
resolved, was a duplicate of something else, or became less pressing for some
reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it.
The information can be, for example, that the problem still occurs, that you
still want the feature, that more information is needed, or that the bug is
(for whatever reason) no longer relevant.

If the bug is still relevant, please remove the stalebug whiteboard tag.