[Yanel-dev] Problem with XMLHelper.documentToString

Guillaume Déflache guillaume.deflache at wyona.com
Wed Mar 4 09:32:59 CET 2009


Michael Wechner schrieb:
> I receive the following error when using
> 
> ERROR org.wyona.commons.xml.XMLHelper.documentToString():66  - 
> java.lang.NullPointerException
> java.lang.NullPointerException
>        at 
> org.apache.xml.serializer.TreeWalker.dispatachChars(TreeWalker.java:244)
>        at 
> org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:414)
>        at 
> org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:143)
>        at 
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:389) 
> 
>        at 
> org.wyona.commons.xml.XMLHelper.documentToString(XMLHelper.java:64)
> 
> which is similar
> 
> https://jira.jboss.org/jira/browse/JSFUNIT-70
> 
> I have not observed this before. Is it possible that this because of the 
> recent XML lib changes?

It is possible, as:
- this particular class uses JAXP and so its lookup mechanism (partly 
dependent on classpath order) to build the Transformer objects to use
- the recent endorsing-related changes you seem to refer to actually 
also put the JRE's JAXP implementations to the 1st position in the 
classpath again!

So maybe we should "reendorse" the XML libs as before, as it still seems 
necessary for backward compatibility, but then we'd better fix 
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=7001 before 
doing that!


More information about the Yanel-development mailing list