我在WSO2 ESB 4.6.0中构建了一个处理大量消息的代理,但现在却抛出了这个异常。
为什么会发生这种情况?我该如何解决这个问题?
ERROR {org.apache.synapse.mediators.transform.XSLTMediator} - Unable to perform XSLT transformation using : Value {name ='null', keyValue ='conf:ManageWorkforce/xslt/SoapFaultToStandardHeader.xsl'} against source XPath : s11:Body/child::*[position()=1] | s12:Body/child::*[position()=1] {org.apache.synapse.mediators.transform.XSLTMediator}
net.sf.saxon.om.NamePool$NamePoolLimitException: NamePool limit exceeded: max 1023 prefixes per URI
at net.sf.saxon.om.NamePool.allocate(NamePool.java:437)
at net.sf.saxon.om.FingerprintedQName.allocateNameCode(FingerprintedQName.java:99)
at net.sf.saxon.tree.tiny.TinyBuilder.startElement(TinyBuilder.java:235)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:285)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:405)
at net.sf.saxon.event.Sender.send(Sender.java:178)
at net.sf.saxon.Controller.transform(Controller.java:1790)
at org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:289)
at org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:191)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:112)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:230)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:217)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
修改
我注意到,对于标有“返回请求状态”复选框的DSS操作,返回类似于:
<axis2ns5:REQUEST_STATUS xmlns:axis2ns5="http://ws.wso2.org/dataservice">SUCCESSFUL</axis2ns5:REQUEST_STATUS>
其中前缀中的数字5
会针对每个服务请求递增。我想当这个数字达到1024时,就会发生这个错误。
我想弄清楚如何防止这种情况。
答案 0 :(得分:2)
2011年,Jean-Michel亲切地提到了这一点。
从那时起,为了减少对NamePool的依赖,已经有了进一步的发展。其中最重要的可能是当您使用第三方树模型(如JDOM2或AXIOM)时,不再分配NamePool名称代码。因此,如果您将处理切换为使用这样的树模型,则可以处理由Axis2生成的奇怪XML文件(使用大量名称空间前缀),而不会超出Saxon的限制。
答案 1 :(得分:1)
您可以在那里找到此问题的详细信息:http://sourceforge.net/p/saxon/mailman/message/27969616/
这是他对同一命名空间的不同前缀的全局限制
如果可以
,解决方案是规范化前缀