[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster-devel] XML parsing problem with Log4j and JDK 1.5.0b2

Sébastien Schneider wrote:

There is a compatibility problem with the crimson XML SAX parser used by XmlBlaster (parser.jar in lib directory) and the use of Log4j (last stable version of each, 0.903 and 1.2.8 respectively).

The error is this exception when parsing the log4j.xml file with the xmlblaster embedded crimson parser:

log4j:ERROR Could not parse input source [org.xml.sax.InputSource at d1e604].
java.lang.IllegalStateException: can't declare any more prefixes in this context
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:523)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:173)

at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:665)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)

        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.apache.log4j.Logger.getLogger(Logger.java:94)
        at HelloWorldBlasterLog4j.<clinit>(HelloWorldBlasterLog4j.java:21)

I try to replace crimson with xerces implementation and it works fine, but I don't know how well can run XmlBlaster with xerces parser as you say "# JAXP parsers. Currently only crimson is actually possible to use. " in xmlBlaster.properties file....

Hi Sébastien,

all not portable XML code is encapsulated into


If you look into this file there a three methods which need
to be coded to work with other parsers.
I think xmlBlaster can run with parsers others than crimson
when you implement those three methods.



This crimson problem seems to be well known and may be the latest JDK version can do something in that... (I don't try with an older JDK..).

Have you ever meet that problem and is there a nicest way to solve it ?

Sebastien Schneider.


Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et etabli a l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'IFP decline toute responsabilite au titre de ce message.

This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP should not be liable for this message.

Visitez notre site Web / Visit our web site : http://www.ifp.fr