xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48741] javax.xml.stream.XMLOutputFactory should not depend on woodstox/WstxOutputFactory
Date Sat, 20 Feb 2010 11:06:10 GMT

--- Comment #2 from Dannes Wessels <dizzzz@exist-db.org> 2010-02-20 11:06:06 UTC ---
Since Java6 a default implementation is part of the JVM, e.g. check
http://kickjava.com/src/javax/xml/stream/XMLOutputFactory.java.htm : for the
*sun* jvm the default implementation is
com.sun.xml.internal.stream.XMLOutputFactoryImpl , for other vendors
(classpath?harmony?) this will be a different class.

You are right that via the 'service registry' the sun implementation should be
found, but this is -onfortunately- not the case. The factoryFinder scans all
jar files on the classpath, and reads for the "META-INF/services/"thing in
there. SUn does not set this service thing for its own jar files.

IMO it would be logical to choose for
com.sun.xml.internal.stream.XMLOutputFactoryImpl by default. Best alternative
is probably to use some reflection on the presence of some alternative
implementations as well.

Note that just by putting xml-api.jar on the classpath my application stopped
working. For our project there is no need to have an other StAX implementation
than a simple default one provided by the JVM.

I think closing this report is not a good thing. please reconsider :-)



Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message