Use of DTDs files in XML documents when using the XPath.execute function.
book
Article ID: KB0090079
calendar_today
Updated On:
Products
Versions
TIBCO BusinessEvents Enterprise Edition
-
Not Applicable
-
Description
Resolution: Description: ========= When an XML document uses a DTD file such as <!DOCTYPE HDR SYSTEM "MLEP_HDR_11.DTD"> the DTD file must be placed in the same directory that the be-engine is run from or an error will happen. See the "Symptoms" section below for the error thrown if the file is not present. Also see the "Resolution" section regarding how to change this behavior.
Environment: ========== All
Symptoms: ========= When the DTD file is not present in the directory that be-engine was started from the following error happens: 2010 Nov 05 17:11:50:194 GMT -4 guy-T400.na.tibco.com Error [main] - [BusinessEvents Archive] Got runtime exception while invoking Action be.gen.BusinessEvents$0020Archive.BE$$Actions$Startup@1024994 Objects <> java.lang.RuntimeException: java.io.FileNotFoundException: C:\Logs\SR_1-BBI0VY\MLEP_HDR_11.DTD (The system cannot find the file specified) at com.tibco.be.functions.xpath.XPathHelper.execute(XPathHelper.java:337) at be.gen.Rules.nullXMLNode$.XMLNode(nullXMLNode$.java:10) at be.gen.BusinessEvents$0020Archive.BE$$Actions$Startup.execute(BE$$Actions.java:14) at com.tibco.cep.kernel.core.rete.ReteWM.invoke(ReteWM.java:384) at com.tibco.cep.kernel.core.rete.ReteWM.start(ReteWM.java:166) at com.tibco.cep.runtime.session.impl.RuleSessionImpl.start(RuleSessionImpl.java:285) at com.tibco.cep.runtime.session.impl.RuleSessionManagerImpl.start(RuleSessionManagerImpl.java:238) at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.startAll(RuleServiceProviderImpl.java:845) at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.configure(RuleServiceProviderImpl.java:190) at com.tibco.cep.container.standalone.BEMain.jumpStart(BEMain.java:132) at com.tibco.cep.container.standalone.BEMain.main(BEMain.java:45) Caused by: java.io.FileNotFoundException: C:\Logs\SR_1-BBI0VY\MLEP_HDR_11.DTD (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source) at java.net.URL.openStream(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at com.tibco.xml.datamodel.parse.DefaultXiParser.parse(DefaultXiParser.java:120) at com.tibco.be.functions.xpath.XPathHelper.execute(XPathHelper.java:332) ... 10 more Cause: ===== The XPath.execute statement is reading the DTD file to validate the structure of the XML document.
Resolution: ========= Change the DTD reference to:
<!DOCTYPE HDR SYSTEM "file:///C:/Logs/SR_1-BBI0VY/api2/MLEP_HDR_11.DTD">
This looks on the local host in the above directories.
Issue/Introduction
Use of DTDs files in XML documents when using the XPath.execute function.