ConfigurationException: XML-22101: (Fatal Error) DOMSource node as this type not supported

When you setup your project with commons-configuration library plugged in sometimes you can get very misleading error:

ConfigurationException: XML-22101: (Fatal Error) DOMSource node as this type not supported

This error may be caused by missing XML library bindings. In order to fix that error you have to configure properly some service providers (point JVM to correct XML parsing/transformation implementations).

How to do that? You have to create the following directory structure somewhere under classpath:

  • META-INF
  • META-INF/services
  • META-INF/services/interface_name_files

Then inside "services" directory place filenames named after interfaces and filled with full class name of an implementation, for example (Xerces + Xalan plugged in):

  • src/META-INF/services/javax.xml.parsers.DocumentBuilderFactory
    • org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
  • src/META-INF/services/javax.xml.parsers.SAXParserFactory
    • org.apache.xerces.jaxp.SAXParserFactoryImpl
  • src/META-INF/services/javax.xml.transform.TransformerFactory
    • org.apache.xalan.processor.TransformerFactoryImpl

After this change proper XML implementation should be used (if the jar is present on classpatch of course).

This entry was posted in en and tagged . Bookmark the permalink.

5 Responses to ConfigurationException: XML-22101: (Fatal Error) DOMSource node as this type not supported

  1. Funny, this is the 2nd time I arrive at your blog while Googling for a BPH issue ;)

  2. prad says:

    Indeed, but at the moment expect no new posts on that AFAIR ;-)

  3. Narendra Yanamadala says:

    We had this issue on one of our Weblogic Deployment. The issue was resolved by simply restarting JVM on the node. We were not able to root cause the issue tough.

  4. dariusz.cieslak says:

    Probably you've changed configuration but JVM was not restarted after that change. New configuration has been loaded after restart and that's why error is no more visible.

  5. Agung says:

    Hi,
    For me, the error happened occasionally, sometimes happen and sometimes not.
    Did you ever experience issue like that?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>