Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 166974 - AntEditor fails with XML11Configuration when using taskdef and its resource attribute
Summary: AntEditor fails with XML11Configuration when using taskdef and its resource a...
Status: RESOLVED DUPLICATE of bug 152793
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.2.1   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: 2006-12-06 12:25 EST by Robert Gacki CLA
Modified: 2006-12-06 12:36 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gacki CLA 2006-12-06 12:25:49 EST
Build ID: M20060921-0945

Steps To Reproduce:
1. Create a taskdef using a JAR file (classpath) and set the value of the attribute "resource" to an antlib xml definition within the JAR

Example (in my case, I used the ant4eclipse-0.5.0.beta.jar from http://ant4eclipse.sourceforge.net):

<path id="path.taskdef.classpath">
	<fileset dir="${basedir}/build/lib">
		<include name="**/*.jar" />
	</fileset>
</path>

<taskdef resource="net/sf/ant4eclipse/antlib.xml">
	<classpath refid="path.taskdef.classpath" />
</taskdef>

More information:
Running ant from command or from inside Eclipse line works fine. The error occures when trying to open the build file in the AntEditor.

Log:

!SESSION 2006-12-06 17:55:29.742 -----------------------------------------------
eclipse.buildId=M20060921-0945
java.version=1.5.0_09
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.ui 4 0 2006-12-06 17:56:18.489
!MESSAGE Unable to create editor ID org.eclipse.ant.ui.internal.editor.AntEditor: org.apache.xerces.parsers.XML11Configuration
!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.apache.tools.ant.helper.ProjectHelper2.parseUnknownElement(ProjectHelper2.java:88)
	at org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:75)
	at org.apache.tools.ant.taskdefs.Definer.loadAntlib(Definer.java:327)
	at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:236)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.eclipse.ant.internal.ui.model.AntDefiningTaskNode.configure(AntDefiningTaskNode.java:86)
	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.editor.text.AntFoldingStructureProvider.updateFoldingRegions(AntFoldingStructureProvider.java:88)
	at org.eclipse.ant.internal.ui.editor.AntEditor.projectionEnabled(AntEditor.java:1370)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:481)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:529)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1429)
	at org.eclipse.ant.internal.ui.editor.AntEditor$StatusLineSourceViewer.doOperation(AntEditor.java:302)
	at org.eclipse.ant.internal.ui.editor.AntEditor.createPartControl(AntEditor.java:1103)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1311)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:455)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:102)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:441)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:111)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:60)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:820)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:719)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:680)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2593)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2528)
	at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2520)
	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2505)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2500)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2485)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:388)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:350)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:275)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:139)
	at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:190)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:174)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:267)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:243)
	at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50)
	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:220)
	at org.eclipse.ui.internal.navigator.CommonNavigatorManager$1.open(CommonNavigatorManager.java:114)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:817)
	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.fireOpen(StructuredViewer.java:815)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1069)
	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:353)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1168)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:243)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:283)
	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 2006-12-06 12:36:51 EST
Thank you for the bug report.

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