Tatu Saloranta <cowtownco...@yahoo.com> wrote on 12/20/2008 06:35:05 PM:
> --- On Sat, 12/20/08, Brian Minchau <minc...@ca.ibm.com> wrote: > ... > > The Apache Xalan-J classes have package names starting with > > org.apache.xalan or org.apache.xml or org.apache.xpath. So which objects > > are eating up memory, because your traceback doesn't show any of these. > > > > Also the exception you have occured in > > com.sun.org.apache.xpath.internal.XPathAPI, which looks like your > > problem is with SUN not Apache. Apache Xalan-J has this class: > > org.apache.xpath.XPathAPI, and that sure looks like a SUN version of > > that Apache class. > > As far as I know, this is just an artifact of how most 3rd party > packages are bundled with JDK these days: Sun renames packages to > make it easier to override implementations by just plugging in "non- > Sun" version of Xerces, Xalan and other similar packages. So it > should be just matter of peeling of the leading "com.sun", and those > should map to well know 'source' classes. > > I think versions Sun bundled are generally quite old, due to length > of release cycle; and sometimes there are backported fixes, making > it difficult to figure exactly which version you are looking at. The point I keep driving home on the Xerces mailing lists is that Sun's versions are a fork of the Apache codebase, not just a rename of packages with some bug fixes, but all sorts of new development and changes which never existed in Xerces or Xalan. It has reported bugs and other behaviour which is unique to it. At least for the Xerces derived parts in Java 5 I have good reason to believe they're not even based off of a released version but more likely a snapshot of the dev line in the repository taken on some day between Xerces-J 2.6.2 and 2.7.0. See these discussions [1][2] in the mailing list archives with a user asking for help for things we had not released yet but were in his copy of Java 5. With Java 6 if I query the Sun renamed Xerces version class I get: java com.sun.org.apache.xerces.internal.impl.Version Xerces-J 2.6.2 which couldn't possibly be close to that version; Xerces-J 2.6.2 being a JAXP 1.2 impl vs. Java 6 with JAXP 1.4 (including StAX). There's no Apache equivalent of the JAXP 1.4 / Java 6 stuff yet. > Because of this, it is usually recommended that one always adds > explicit Xerces and Xalan packages and not rely on whatever default > JDK comes equipped with. This way you will be using up-to-date > versions, and know exactly which versions they are. I often encourage folks to do this when they're asking for help. After all they're asking their question in the Apache forum. Derivatives are outside of this realm. > -+ Tatu +- Thanks. [1] http://marc.info/?t=110970790200001&r=1&w=2 [2] http://marc.info/?t=110912539100002&r=1&w=2 Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org