4 Replies Latest reply on Nov 28, 2005 9:31 PM by adrian.brock

    Dependency on Xerces

    aloubyansky

      Besides the fact that Xerces' XS API is used to parse schemas, an instance of SAX parser created in Unmarshaller is initialized with Xerces-specific features. Trying to use another parser, e.g. Crimson that comes with Sun's j2sdk1.4.2, will fail with org.xml.sax.SAXNotRecognizedException.
      I refactored the code to set only standard validation and namespace features. However, if we use Xerces with validation on, to pass the testsuite we also should set Xerces-specific dynamic validation feature. So, currently, when the unmarshaller is created dynamic validation is also set on the parser and if not recognized then it's ignored.

      This came up from the JBossCache that doesn't have dependency on Xerces and wants to use ObjectModelFactory approach.

        • 1. Re: Dependency on Xerces
          manik

          Alexey,

          While the fix may work well in HEAD, it doesn't help me very much since I would need to consider cases where people using older versions of JBossAS (e.g., 3.2.x) may want to upgrade to the latest JBossCache/JGroups. While JBossCache can package a new jboss-common.jar built from HEAD, people who just want to drop in the new jboss-cache.jar and jgroups.jar would have problems.

          For the time being, I've resorted to not using the ObjectModelFactory approach and parsing the XML snippet by hand, manipulating ugly Node and Element classes.

          So I expect this dependency on Xerces not to be there in the next release of JBossAS?

          Cheers,
          Manik

          • 2. Re: Dependency on Xerces

            And this is the very integration problem I have been complaining about.
            Manik's solution just makes it worse.

            If JBossCache wants to play with JEMS it needs to let JEMS control the integration.

            The backward compatibility is an edge case that just shows your abstraction is wrong.
            i.e. How can a user plugin their own JBossCache config
            e.g. write their own parser if they don't want to use JBossXB to do the xml->config mapping.

            • 3. Re: Dependency on Xerces
              starksm64

              We need to have an R&D call on how to do integration across jems.

              • 4. Re: Dependency on Xerces

                There is still a Dependency on Xerces for JDK1.4
                that is coming through the DOM3 classes.

                e.g.
                org.w3c.dom.DOMErrorHandler
                org.w3c.dom.DOMError
                javax.xml.XMLConstants
                only exist in the xerces jars unless you use java5