Hello,

We are currently using XALAN 2.1.0. Every now and again we obtain the
following exception when trying to create a new Transformer using
newTransformer() method of TransformerFactoryImpl:

java.lang.ArrayIndexOutOfBoundsException
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1048)
        at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFa
ctoryImpl.java:864)
        at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer
FactoryImpl.java:687)

It happens periodically and with different XSL files. I use a
StreamSource(File) in the call to newTransformer. The XSL files are fine
because it works and transforms 99% of the time.

For debugging I trapped the TransformerConfigurationException  that this
exception is part of. I then read and output the XSL file as a test. This is
fine.
I also try to create a Transformer using some other test XSL. This is also
fine - so I'm assuming the factory object is OK.

I've placed the code in a synchronized block because I'm aware of
concurrency problems with TransformerFactoryImpl:


private TransformerFactory factory;        

....

        synchronized(this.factory) {
            try {
                //throw new TransformerConfigurationException("Test
Exception");
                return this.factory.newTransformer(new
StreamSource(this.xslSourceFile));
            } catch (TransformerConfigurationException tcex) {
                //Error handling code described above
        }

Has anyone experienced a similar problem?
I found a post on
http://www2.real-time.com/pipermail/cocoon-users/2001-January/009997.html
that describes a similar exception with Cocoon.

The guy seemed to state that he only had the problem with a multi CPU
machine. If he used 1 CPU - it worked every time.

However our platform has 1 CPU:

SUN Netra T1/105        1 UltraSPARC CPU 360 Hz    512 M
JDK 1.3.1-b24
XALAN 2.1.0

Any ideas?

Many thanks in advance

Mark

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient, you should not copy, retransmit or
use the e-mail and/or files transmitted with it  and should not disclose
their contents. In such a case, please notify [EMAIL PROTECTED]
and delete the message from your own system. Any opinions expressed in this
e-mail and/or files transmitted with it that do not relate to the official
business of this company are those solely of the author and should not be
interpreted as being endorsed by this company.

Reply via email to