Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 214343 - ant buildfile add failes: ClassCastException in xerces parser
Summary: ant buildfile add failes: ClassCastException in xerces parser
Status: RESOLVED DUPLICATE of bug 143008
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.2   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: 2008-01-04 08:09 EST by Wouter Groeneveld CLA
Modified: 2008-01-04 12:13 EST (History)
1 user (show)

See Also:


Attachments
error output (124.32 KB, image/jpeg)
2008-01-04 08:09 EST, Wouter Groeneveld CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wouter Groeneveld CLA 2008-01-04 08:09:39 EST
Created attachment 86184 [details]
error output

Build ID: M20060629-1905

Steps To Reproduce:
1.After closing and reopening different projects, the ant buildfile automatically closes with the project. So you have to re-add it to the ant window.
2.Add a buildfile to ant via drag & drop or the add button
3.'an error has occured' message from eclipse right after adding the buildfile. It does NOT get parsed and ant does not work afterwards. eclipse has to be restarted.

This does not occur EVERY time I try to add the buildfile. Only after closing & reopening a project X times (different every time, and all build files sometimes refuse to be parsed, it's not file-specific - the XML is correct and it does get parsed most of the time). 


More information:
Eclipse log:

!ENTRY org.eclipse.jface 4 2 2008-01-04 13:45:04.098
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.parsers.SAXParser.<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:205)
	at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:163)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:193)
	at org.eclipse.ant.internal.ui.editor.utils.ProjectHelper.parse(ProjectHelper.java:526)
	at org.eclipse.ant.internal.ui.editor.utils.ProjectHelper.parse(ProjectHelper.java:631)
	at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:140)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.eclipse.ant.internal.ui.model.AntImportNode.configure(AntImportNode.java:70)
	at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:501)
	at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:326)
	at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:263)
	at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1383)
	at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1393)
	at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:285)
	at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63)
	at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:86)
	at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.getLabel(AntProjectNodeProxy.java:106)
	at org.eclipse.ant.internal.ui.model.AntModelLabelProvider.getText(AntModelLabelProvider.java:36)
	at org.eclipse.jface.viewers.StructuredViewer.buildLabel(StructuredViewer.java:2102)
	at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:258)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:95)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:843)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:840)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:465)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:843)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1955)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:744)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createAddedElements(AbstractTreeViewer.java:313)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalAdd(AbstractTreeViewer.java:257)
	at org.eclipse.jface.viewers.TreeViewer.internalAdd(TreeViewer.java:910)
	at org.eclipse.jface.viewers.AbstractTreeViewer.add(AbstractTreeViewer.java:136)
	at org.eclipse.jface.viewers.AbstractTreeViewer.add(AbstractTreeViewer.java:593)
	at org.eclipse.ant.internal.ui.views.AntViewContentProvider.add(AntViewContentProvider.java:44)
	at org.eclipse.ant.internal.ui.views.AntView.addProject(AntView.java:456)
	at org.eclipse.ant.internal.ui.views.actions.AddBuildFilesAction$2.run(AddBuildFilesAction.java:75)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:158)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:326)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:479)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:265)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:894)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:929)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:904)
	at org.eclipse.ant.internal.ui.views.actions.AddBuildFilesAction.run(AddBuildFilesAction.java:63)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	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.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 1 Darin Swanson CLA 2008-01-04 12:13:03 EST
This is fixed in Eclipse 3.2.1



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