Bug 23239 - switching Ant 1.4.1 to Ant1.5 fails with xml parser apis
Summary: switching Ant 1.4.1 to Ant1.5 fails with xml parser apis
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: core
: 25005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-05 15:21 EDT by Sharad Jain CLA
Modified: 2009-08-30 02:19 EDT (History)
1 user (show)

See Also:


Attachments
TRAX only apis (18.18 KB, application/octet-stream)
2002-09-26 05:18 EDT, Henri Gomez CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sharad Jain CLA 2002-09-05 15:21:30 EDT
In order to switch from ant1.4.1 to ant1.5, I replaced
(ant.jar/jakarta-ant-1.4.1-optional.jar/xmlParserAPIs.jar/xercesImpl.jar)
to
(ant.jar/optional.jar/xercesImpl.jar/xml-apis.jar).

But then, the call to ant by invoking build.xml (Run Ant ...)
fails saying
"XML parser factory has not been configured correctly: Provider for 
javax.xml.parsers.SAXParserFactory cannot be found".

Looks like, it somehow fails to read the new manifest.mf file.
Or remembers the previous file).

Also, the Ant-classpath does not persist between two sessions
of Eclipse (i.e. when I close the eclipse and come again, the
classpath gets reset to ant1.4.1 !?!) - but that is another issue.
Comment 1 Shane Curcuru CLA 2002-09-11 12:30:57 EDT
Note that the xml-xerces and xml-xalan communities at xml.apache.org might have comments, along 
with the jakarta-ant community obviously.  The Xalan-J project ships the xml-apis.jar file from the 
xml-commons repository; normally it's used in Xalan builds (where it includes just the 
xercesImpl.jar from a Xerces-J build).  Note that the xml-apis.jar is mostly a superset of the 
xmlParserAPIs.jar file (which Xerces-J manages), however there may be a few subtle code changes 
in some files, and the manifests between these two files are not currently coordinated at all 
(afaik).
But that shouldn't matter, since the xercesImpl.jar file should have already 
definied the proper META-INF/services/... keys that point to it's own SAXParserFactoryImpl, 
which the JAXP FactoryFinder code should have read and properly gotten the Xerces parser stuff.  
My first guess would be classloader wierdness in Eclipse, since the JAXP code itself is in xml-
apis.jar, but the Xerces services properties and implementations are all in xercesImpl.jar.  
(Just a guess...)
Comment 2 Henri Gomez CLA 2002-09-26 05:18:47 EDT
Created attachment 2063 [details]
TRAX only apis
Comment 3 Henri Gomez CLA 2002-09-26 05:20:23 EDT
Ant 1.5 works with Eclipse 2.0.1, I also added xalan 2.4.0 and the previously
attached trax only apis in external tool classpath.

BTW, you should keep xerces_4_0_5 or you broke completly eclipse, something
weird with the eclipse classloader ?
Comment 4 Andreas Buehler CLA 2002-10-21 11:20:50 EDT
*** Bug 25005 has been marked as a duplicate of this bug. ***
Comment 5 Darin Swanson CLA 2002-10-25 11:49:23 EDT
With eclipse moving to Ant 1.5.1 (in Head and proposed to be in the integration 
build of Oct 29th), can someone step up to verify that this bug report is no 
longer a problem?
Comment 6 Darin Swanson CLA 2002-11-12 22:10:53 EST
Problem still reported (see bug 21809)
Comment 7 Darin Wright CLA 2002-11-15 12:44:59 EST
Needs investigation
Comment 8 Rob Dupuis CLA 2002-11-28 07:38:17 EST
We have come acoss this problem with Eclipse 2.0. We're going to go to the 
latest 2.1 M3 build as a fix.
Comment 9 Darin Swanson CLA 2002-12-26 19:53:11 EST
Note that the problem seems to be related to using a 1.3.* VM.
Comment 10 Darin Swanson CLA 2003-01-18 16:56:40 EST
Confirmed that the problem does not occur if using a 1.4.* VM
Reproduceable on 1.3.1_06.
Comment 11 Darin Swanson CLA 2003-02-06 09:51:58 EST
With the workarounds described, will look at again after 2.1 but likely no fix 
to be had here.
Comment 12 Darin Swanson CLA 2003-03-11 09:30:10 EST
This was a problem with the Xerces classes being loaded across multiple class 
loaders.
This has been fixed by:
setting the thread context classloader
all Xerces classes should and can be loader from the plugin classloader for 
the Xerces plugin provided by Eclipse
Xerces is on the bootclasspath for 1.4.* VMs.
See bug 33117 and bug 33664 for more details.

Closing.
Comment 13 Denis Roy CLA 2009-08-30 02:19:56 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.