You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by An...@intermoves.de on 2005/11/04 12:43:09 UTC

Xalan 2.7.0: NullpointerExceptions when reusing the transformer

Hallo,

       first of all thank you, the members of the Xalan community, for the
great job you do by developing and maintaining the Xalan-java processor!

       We use Xalan in a framework that transforms and audits e-business
catalogs since 2001. This framework builds one transformer and reuses up to
more
        than 100000 times. And it works fine.

       The transformations are performed (essentially) in the following
code fragment:

       JDOMResult out = new JDOMResult ();
       transformer.transform (new JDOMSource (in), out);

       After the update from JDOM beta 0.9 to JDOM 1.0 (and with a
different XSLT-Script for a different, customized data model) the transform
method
       throws sometimes a NullpointerException without any Stacktrace or
message in e.getMessage().

       One catalog under test has about 33000 Positions, each position is
transformed by one call of the method transformer.transform(...).
       With the identical catalog the Exception is sometimes thrown during
one export of the catalog, sometimes not.

       The NullpointerException not has been thrown two times at the same
position in the different exports. So it is difficult to correlate the
Exception to the use
        of a specific template or line of code in the XSLT-Script. The
Script has about 1200 lines of code and uses Java extension functions.

       This NullpointerException has be reproduced with the JDK 1.4.2

       * under Fedora  Core 3 with and without the NPTL and XALAN 2.5.1,
       * and with Fedora  Core 3 without NPTL and XALAN 2.7.0,
         * and has been reproduced with XALAN 2.5.1 under Fedora Core 2
without NPTL.

        We have not been able to reproduce this under Windows 2000.

       As a work around I build a new transformation engine on each
transformation, but this slows down the whole application by a factor of 3.
       This work around has been tested with more the 40 exports of the
specific catalog and the Exception has not been thrown. When the
        transformer is reused then the Exception occurs in abouts 50 % of
the exports.

        I wish to thank you for the time you spend in reading this email.

  Any help is welcome!

       Greetings

       Andreas


---------------------------------------------------------------------------

       Andreas Rulle

       Intermoves AG
  Technologiepark 19
  33100 Paderborn