Hi Group,

 

       We are using Saxon (8.0) for merging 2 XML documents and producing a 3rd XML using XSLT. We got the following exception couple of days back. I am using a custom TransformerFactory (Singleton) to get a Transformer. Any pointers or suggestions are welcome……

 

net.sf.saxon.om.NamePool$NamePoolLimitException: Saxon name pool is full

        at net.sf.saxon.om.NamePool.allocate(NamePool.java:493)

        at net.sf.saxon.om.NamePool.allocate(NamePool.java:453)

        at net.sf.saxon.expr.ExpressionTool.resolveCallsToCurrentFunction(ExpressionTool.java:509)

        at net.sf.saxon.style.StyleElement.typeCheck(StyleElement.java:951)

        at net.sf.saxon.style.XSLValueOf.validate(XSLValueOf.java:83)

        at net.sf.saxon.style.StyleElement.validateSubtree(StyleElement.java:1127)

        at net.sf.saxon.style.StyleElement.validateChildren(StyleElement.java:1161)

        at net.sf.saxon.style.StyleElement.validateSubtree(StyleElement.java:1136)

        at net.sf.saxon.style.StyleElement.validateChildren(StyleElement.java:1161)

        at net.sf.saxon.style.StyleElement.validateSubtree(StyleElement.java:1136)

        at net.sf.saxon.style.StyleElement.validateChildren(StyleElement.java:1161)

        at net.sf.saxon.style.StyleElement.validateSubtree(StyleElement.java:1136)

        at net.sf.saxon.style.StyleElement.validateChildren(StyleElement.java:1161)

        at net.sf.saxon.style.StyleElement.validateSubtree(StyleElement.java:1136)

        at net.sf.saxon.style.StyleElement.validateChildren(StyleElement.java:1161)

        at net.sf.saxon.style.StyleElement.validateSubtree(StyleElement.java:1136)

        at net.sf.saxon.style.XSLStylesheet.preprocess(XSLStylesheet.java:637)

        at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(PreparedStylesheet.java:269)

        at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:117)

        at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:133)

        at net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:88)

        at com.comp.MyTransformerFactory.getTransformer(MyTransformerFactory.java:29)

 

 

Here is my Transformer Factory:

 

public class MyTransformerFactory {

  private static TransformerFactory transformerFactory;

 

  private static TransformerFactory getTransformerFactory() throws Exception{

      if (transformerFactory == null) {

        System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl"); 

        transformerFactory = TransformerFactory.newInstance();

      }

      return transformerFactory;

  }

 

  public static Transformer getTransformer(final String xslNameLocation) throws Exception {

    try {

      return getTransformerFactory().newTransformer(new StreamSource(xslNameLocation));

    } catch (Exception e) {

      throw e;

    }

  }

}

 

Thanks,

Srini

*****************************************************************
This message has originated from RLPTechnologies,
26955 Northwestern Highway, Southfield, MI 48033.

RLPTechnologies sends various types of email
communications.  If this email message concerns the
potential licensing of an RLPT product or service, and
you do not wish to receive further emails regarding Polk
products, forward this email to Do_Not_Send@rlpt.com
with the word "remove" in the subject line.

The email and any files transmitted with it are confidential
and intended solely for the individual or entity to whom they
are addressed.

If you have received this email in error, please delete this
message and notify the Polk System Administrator at
postmaster@rlpt.com.
*****************************************************************