I'm guessing you're reusing the Transformer object in multiple threads
at the same time.  The Transformer object is not thread-safe.  You'll
need to share the Templates object instead, and generate the Transformer
object in each thread.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> 
>        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
> 
> 
> 

Reply via email to