Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 297561 - [Ant] All targets disappear if I hit Restore Default Entries when configuring xml build, after that unable to open xml files.
Summary: [Ant] All targets disappear if I hit Restore Default Entries when configuring...
Status: CLOSED DUPLICATE of bug 196346
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-11 04:00 EST by Vadim Mironov CLA
Modified: 2010-01-12 11:49 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Mironov CLA 2009-12-11 04:00:17 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33 Safari/532.0
Build Identifier: I20091030-1201

I have ant xml build file in my project. If I right click on it, select Run As -> Ant Build... and then go to classpath tab, when I'm clicking Restore Default Entries all Targets tab becomes empty and error is shown "[Targets]: No targets could be determined for the buildfile".

After that if I open xml build file, view fails with an error:

java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
	at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:215)
	at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:185)
	at org.apache.tools.ant.helper.ProjectHelper2.parseUnknownElement(ProjectHelper2.java:92)
	at org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:75)
	at org.apache.tools.ant.taskdefs.Definer.loadAntlib(Definer.java:429)
	at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:281)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at org.eclipse.ant.internal.ui.model.AntDefiningTaskNode.configure(AntDefiningTaskNode.java:86)
	at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:511)
	at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:331)
	at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:267)
	at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1393)
	at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1403)
	at org.eclipse.ant.internal.ui.editor.text.AntFoldingStructureProvider.updateFoldingRegions(AntFoldingStructureProvider.java:88)
	at org.eclipse.ant.internal.ui.editor.AntEditor.projectionEnabled(AntEditor.java:1230)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:488)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:536)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1440)
	at org.eclipse.ant.internal.ui.editor.AntEditor$StatusLineSourceViewer.doOperation(AntEditor.java:221)
	at org.eclipse.ant.internal.ui.editor.AntEditor.createPartControl(AntEditor.java:963)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99)
	at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:99)
	at org.eclipse.ui.views.navigator.OpenActionGroup.runDefaultAction(OpenActionGroup.java:133)
	at org.eclipse.ui.views.navigator.MainActionGroup.runDefaultAction(MainActionGroup.java:330)
	at org.eclipse.ui.views.navigator.ResourceNavigator.handleOpen(ResourceNavigator.java:787)
	at org.eclipse.ui.views.navigator.ResourceNavigator$6.open(ResourceNavigator.java:499)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3917)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3510)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:367)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:611)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1363)


Reproducible: Always

Steps to Reproduce:
1.Create Ant xml build file.
2.Right click on it, then Run as -> Ant Build...
3.On Targets tab click Restore Default Entries
Comment 1 Vadim Mironov CLA 2009-12-11 04:16:46 EST
Just tried with empty metro stack distro in fresh workspace and it seems that there is no such problem, but in my main workspace I get it every time i repeat the sequence. Hmmm, don't have any clues what might be causing this behaviour, can somebody work out some explanation from stack trace?
Comment 2 Vadim Mironov CLA 2009-12-11 04:28:09 EST
Some more exceptions preceding view failure:

!ENTRY org.eclipse.ant.ui 4 0 2009-12-11 03:56:00.203
!MESSAGE Internal error occurred retrieving targets
!STACK 0
java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
	at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:215)
	at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:185)
	at org.apache.tools.ant.helper.ProjectHelper2.parseUnknownElement(ProjectHelper2.java:92)
	at org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:75)
	at org.apache.tools.ant.taskdefs.Definer.loadAntlib(Definer.java:429)
	at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:281)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at org.eclipse.ant.internal.ui.model.AntDefiningTaskNode.configure(AntDefiningTaskNode.java:86)
	at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:511)
	at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:331)
	at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:267)
	at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1393)
	at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1403)
	at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:177)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab$8.run(AntTargetsTab.java:520)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2579)
	at org.eclipse.ui.internal.progress.ProgressManager$RunnableWithStatus.run(ProgressManager.java:1361)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager$7.run(ProgressManager.java:1199)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4364)
	at org.eclipse.ui.internal.progress.ProgressManager.runInUI(ProgressManager.java:1197)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab.getTargets(AntTargetsTab.java:537)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab.initializeFrom(AntTargetsTab.java:646)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab.isValid(AntTargetsTab.java:761)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.refresh(LaunchConfigurationTabGroupViewer.java:516)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$6.widgetSelected(LaunchConfigurationTabGroupViewer.java:423)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:769)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3256)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2045)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:323)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3917)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3510)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1065)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog.open(LaunchConfigurationPropertiesDialog.java:227)
	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialog(DebugUITools.java:481)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(AntLaunchShortcut.java:302)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(AntLaunchShortcut.java:277)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(AntLaunchShortcut.java:95)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:434)
	at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:73)
	at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:121)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3917)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3510)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:367)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:611)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
Comment 3 Michael Rennie CLA 2010-01-12 11:49:51 EST
same stack + resolution as bug 196346, marking as dupe

*** This bug has been marked as a duplicate of bug 196346 ***