Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ejnewto
Post subject: Error opening build.xml file with v 5.0 M2  PostPosted: Aug 03, 2006 - 05:24 PM
Veteran Member
Veteran Member


Joined: Sep 02, 2003
Posts: 16

System config:

Fedora Core 4 Linux 2.6.11-1.1369_FC4smp #1 SMP Thu Jun 2 23:08:39 EDT 2005 i686 i686 i386 GNU/Linux
Eclipse 3.2
MyEclipse Professional v5.0 M2, Build id 20060703-5.0-M2

Situation:

When attempting to open an ant build file (build.xml) with the Ant Editor, I receive the following error message in the editor window but the editor doesn't load the file:

Unable to create this part due to an internal error. Reason for the failure: org.apache.xerces.parsers.XML11Configuration

Clicking on the 'Details' button reveals this stack trace:
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.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.EditorReference.getEditor(EditorReference.java:214)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2588)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2521)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2513)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2498)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2493)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2478)
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.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:306)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:651)
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.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:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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)

This file can be opened with Eclipse 3.1/MyEclipse 4.x. Here is a copy of the build.xml file:

<?xml version="1.0"?>
<project name="map-service" default="install">

<import file="../build/jar-module.xml" />

<path id="module.dependencies.classpath">
<fileset dir="${project.lib.modules.dir}">
<include name="commons/" />
<include name="service-manager/" />
</fileset>
</path>


</project>
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Aug 03, 2006 - 10:35 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Can you go to your MyEclipse menu, then click About MyEclipse then "Installation Summary" and paste the result here for me.

Also the Ant editor is provided by the base JDT, not MyEclipse. But let's see if anything obvious sticks out first.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ejnewto
Post subject:   PostPosted: Aug 04, 2006 - 04:16 PM
Veteran Member
Veteran Member


Joined: Sep 02, 2003
Posts: 16

Here's the info you requested. Also, I just ran a few tests. I opened a build.xml file with the ant editor without problem. I opened the same file with the MyEclipse XML editor without problem. I tried to open the same file with the ant editor again, and got the error. Then I tried once more with the MyEclipse xml editor and got the same error. Sort of schizophrenic, eh?

*** Date: Fri Aug 04 08:13:16 MST 2006

*** System properties:
OS=Linux
OS version=2.6.11-1.1369_FC4smp
Java version=1.5.0_02

*** MyEclipse details:
MyEclipse Enterprise Workbench

Version: 5.0 Milestone 2
Build id: 20060703-5.0-M2

*** Eclipse details:
Eclipse SDK

Version: 3.2.0
Build id: M20060629-1905

Eclipse Project SDK

Version: 3.2.0.v20060609m-GNq6oQq-7es-Y81
Build id: M20060629-1905

Eclipse Platform

Version: 3.2.0.v20060609m-AgOexn6hlEUsvBO
Build id: M20060629-1905

Eclipse Java Development Tools

Version: 3.2.0.v20060609m-F7snq1fxia-Z4XP
Build id: M20060629-1905

Eclipse Graphical Editing Framework

Version: 3.2.0.v20060626
Build id: 20060627-0816

Eclipse RCP

Version: 3.2.0.v20060609m-SVDNgVrNoh-MeGG
Build id: M20060629-1905

Eclipse Plug-in Development Environment

Version: 3.2.0.v20060609m------6zXJJzJzJq
Build id: M20060629-1905

Eclipse startup command=-os
linux
-ws
gtk
-arch
x86
-launcher
/home/ejn/eclipse/eclipse
-name
Eclipse
-showsplash
600
-exitdata
570015
-clean
-vm
/usr/bin/java
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ejnewto
Post subject:   PostPosted: Aug 04, 2006 - 04:18 PM
Veteran Member
Veteran Member


Joined: Sep 02, 2003
Posts: 16

Possibly more related info: After I get the error, when I attempt to Run As...Ant Build... the dialog comes up but has this error message: "No targets could be determined for the buildfile"
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Aug 04, 2006 - 05:01 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Hmm I can't reproduce this locally using an Ant file.

Try this:
1) Flie > Switch Workspace, C:\tempworkspace, hit OK
2) Create a new project with the same Ant file in it.
3) Open it with Ant Editor, close it, open it with MyEclipse XML Editor, close it, try cycle 1 more time. Did it work?
4) If #3 worked, try restarting MyEclipse using the -clean command line argument while opening your old workspace, does it work now?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ejnewto
Post subject:   PostPosted: Aug 04, 2006 - 08:16 PM
Veteran Member
Veteran Member


Joined: Sep 02, 2003
Posts: 16

I followed your instructions but came up with the same results. I do agree that it looks like an Eclipse 3.2 problem rather than a MyEclipse problem since now the MyEclipse editor opens the file for editing without a problem. Thanks for your time.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
jenniferhjones
Post subject:   PostPosted: Aug 07, 2006 - 03:11 PM



Joined: Jan 10, 2006
Posts: 5

I had a similar problem and found the workaround at:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=143008

I first had to remove the build scripts from my ant window, reboot and then bring the build scripts back in.

Hope this helps.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Aug 07, 2006 - 04:34 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Jennifer thank you for the followup to help others with this issue.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
stuarth
Post subject:   PostPosted: Aug 08, 2006 - 11:47 PM



Joined: Aug 08, 2006
Posts: 1

I don't use MyEclipse but hasd same issue with Eclipe 3.2 and found the issue was caused by Eclipse running with Ant version 1.6.2 which was installed locally on my machine. This occured for me as I upgraded a workspace where I had previously customised the Ant libraries used (Window > Preferences Ant).

Once I went into Eclipse Ant preferences and restored the default ANT libraries so it used Ant 1.6.5 which is packaed with Eclipse 3.2 build all was good.

Hope this helps as I know it frustrated me for few days.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Aug 09, 2006 - 04:42 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

stuarth, the followup is very helpful, thanks for adding to the user's initial request for help.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits