4 Replies Latest reply: Sep 1, 2011 8:19 PM by 655560 RSS

    Error: Error: XML Indexer: Fatal Parse error in document

    721257
      Hi,

      I was trying to add a document into using the following code:

      txn = myManager.createTransaction();               
      XmlDocumentConfig docConfig = new XmlDocumentConfig();
      docConfig.setGenerateName(true);
      myContainer.putDocument(txn, docName, content, docConfig);
                     
      //commit the Transaction
      txn.commit();

      the content is juz a string formatted to the UTF-8 format. When I run the program, an error occurs:

      com.sleepycat.dbxml.XmlException: Error: Error: XML Indexer: Fatal Parse error in document at line 2, char 74. Parser message: An exception occurred! Type:NetAccessorException, Message:The host/address 'www.posc.org' could not be resolved (Document: docName_287), errcode = INDEXER_PARSER_ERROR
           at com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_putDocument__SWIG_3(Native Method)
           at com.sleepycat.dbxml.XmlContainer.putDocument(XmlContainer.java:736)
           at com.sleepycat.dbxml.XmlContainer.putDocument(XmlContainer.java:232)
           at com.sleepycat.dbxml.XmlContainer.putDocument(XmlContainer.java:218)
           at ag.SaveMessageinDB.addXMLDocument(SaveMessageinDB.java:157)
           at ag.SaveMessageinDB.saveMessage(SaveMessageinDB.java:58)
           at connector.TextListener.onMessage(TextListener.java:92)
           at com.tibco.tibjms.TibjmsSession._submit(TibjmsSession.java:2775)Reading message: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <!DOCTYPE BLMNOS SYSTEM "http://www.posc.org/ebiz/blmSamples/blmnos.dtd"> at com.tibco.tibjms.TibjmsSession._dispatchAsyncMessage(TibjmsSession.java:1413)
      at com.tibco.tibjms.TibjmsSession$Dispatcher.run(TibjmsSession.java:2491)



      The XML Message that causes this problem is this:

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <!DOCTYPE BLM31603 SYSTEM "http://www.posc.org/ebiz/blmSamples/blm3160-3.dtd">

      <BLM31603>
      <DocumentInformation>
      <documentName namingSystem="POSC pilot">Sample 2</documentName>
      <Version>
      <dtdVersion>1.0 beta</dtdVersion>
      <formVersion>BLM 3160-3 August 1999</formVersion>
      </Version>
      <reportClass>Application for Permit to Drill</reportClass>
      <filingDate>
      <year>1997</year><month>07</month><day>14</day>
      </filingDate>
      <Security>
      <securityClass>confidential</securityClass></Security>
      <BusinessAssociate>
      <Contact>
      <name>Joseph Josephson</name>
      <Address>
      <street>5847 Rushmore Dr.</street>
      <cityName>Rapid City</cityName>
      <stateName namingSystem="USCode">SD</stateName>
      <postalCode namingSystem="USZipCode">57709</postalCode>
      </Address>
      <phoneNumber>266-181-9229</phoneNumber>
      <associatedWith>Black Hills Exploration</associatedWith>
      </Contact>
      <AuthorizedPerson>
      <name>Joseph Josephson</name>
      <title>Vice President of Drilling Operations</title>
      </AuthorizedPerson>
      </BusinessAssociate>
      </DocumentInformation>

      <FieldInformation>
      <regulatoryFieldName>wildcat</regulatoryFieldName>
      <SpacingOrder>
      <spacingUnitSize unit="acre">40</spacingUnitSize>
      </SpacingOrder>
      <ContractDesignation>
      <leaseName>Dog Draw</leaseName>
      <leaseNumber>156-5799-80-89</leaseNumber>
      <unitAgreementName>WY72817</unitAgreementName>
      <leaseSize unit="acre">629.97</leaseSize>
      <indianName type="allottee">James Hickson</indianName>
      </ContractDesignation>
      </FieldInformation>

      <WellInformation>
      <apiWellNumber>510162561100</apiWellNumber>
      <wellID>Dog Draw #1</wellID>
      <wellProduct type="oil"/>
      <wellActivity type="drill"/>
      <wellCompletionType type="single"/>
      <Operator>
      <operatorName>Black Hills Exploration</operatorName>
      <Address>
      <street>5847 Rushmore Dr.</street>
      <cityName>Rapid City</cityName>
      <stateName namingSystem="USCode">SD</stateName>
      <postalCode namingSystem="USZipCode">57709</postalCode>
      </Address>
      <phoneNumber>266-181-9229</phoneNumber>
      <bondCollateralNumber>BF39002976</bondCollateralNumber>
      </Operator>
      <WellLocation>
      <LegalDescription>
      <townshipNumber direction="N">52</townshipNumber>
      <rangeNumber direction="W">68</rangeNumber>
      <sectionNumber>18</sectionNumber>
      <quarterSectionIdentifier>SE 1/4, SW 1/4</quarterSectionIdentifier>
      <locationDistance from="FSL" unit="ft">843</locationDistance>
      <locationDistance from="FWL" unit="ft">1664</locationDistance>
      </LegalDescription>
      <Geopolitical>
      <stateName>WY</stateName>
      <countyName>Crook</countyName>
      </Geopolitical>
      <RelativeFrom from="Town">
      Approximately 15 mi NW of Moorcroft, WY </RelativeFrom>
      </WellLocation>
      <wellElevationHeight referenceCode="GL">4306</wellElevationHeight>

      <WellboreInformation>
      <proposedTotalMeasuredDepth unit="ft">8500</proposedTotalMeasuredDepth>
      <proposedTotalTrueVerticalDepth unit="ft">8450</proposedTotalTrueVerticalDepth>
      <BottomholeLocation>
      <LegalDescription>
      <townshipNumber direction="N">52</townshipNumber>
      <rangeNumber direction="W">68</rangeNumber>
      <sectionNumber>18</sectionNumber>
      <quarterSectionIdentifier>SE 1/4, SW 1/4</quarterSectionIdentifier>
      <locationDistance from="FSL" unit="ft">843</locationDistance>
      <locationDistance from="FWL" unit="ft">1664</locationDistance>
      </LegalDescription>
      <Geopolitical>
      <stateName>WY</stateName>
      <countyName>Crook</countyName>
      </Geopolitical>
      <RelativeFrom from="LeaseLine">
      843 ft from nearest property or lease line</RelativeFrom>
      </BottomholeLocation>
      <operationStartDate>
      <year>1997</year><month>8</month><day>8</day></operationStartDate>
      <estimatedDuration unit="days">37</estimatedDuration>
      <drillingTool type="rotary"/>
      </WellboreInformation>

      </WellInformation>

      <ProposedCasingProgram>
      <CasingInformation type="conductor">
      <drillBitDiameter>12 5/8</drillBitDiameter>
      <tubularOutsideDiameter>9.5</tubularOutsideDiameter>
      <tubularWeight unit="lb/ft">52</tubularWeight>
      <tubularGradeCode>C-22</tubularGradeCode>
      <baseMeasuredDepth unit="ft">3477</baseMeasuredDepth>
      <Cement>
      <cementQuantity unit="sacks" type="Eugene">97</cementQuantity>
      <cementSlurryVolume unit="ft3">1287</cementSlurryVolume>
      <cementSlurryYield unit="ft3/sack">13.1</cementSlurryYield>
      <additive>Rock Salt</additive>
      <additive>carcinogenic biophages</additive>
      <topMeasuredDepth unit="ft">87</topMeasuredDepth>
      </Cement>
      </CasingInformation>
      <CasingInformation type="intermediate">
      <drillBitDiameter>8 7/8</drillBitDiameter>
      <tubularOutsideDiameter>8.125</tubularOutsideDiameter>
      <tubularWeight unit="lb/ft">43</tubularWeight>
      <tubularGradeCode>D-220</tubularGradeCode>
      <baseMeasuredDepth unit="ft">9112</baseMeasuredDepth>
      <Cement>
      <cementQuantity unit="sacks" type="Portland">82</cementQuantity>
      <cementSlurryVolume unit="ft3">1003</cementSlurryVolume>
      <cementSlurryYield unit="ft3/sack">13.1</cementSlurryYield>
      <stageCementerMeasuredDepth unit="ft">6633</stageCementerMeasuredDepth>
      </Cement>
      <Cement>
      <cementQuantity unit="sacks" type="Seattle">116</cementQuantity>
      <cementSlurryVolume unit="ft3">1504</cementSlurryVolume>
      <cementSlurryYield unit="ft3/sack">13.1</cementSlurryYield>
      <additive>mucilaginous algal-based slime</additive>
      <stageCementerMeasuredDepth unit="ft">3483</stageCementerMeasuredDepth>
      </Cement>
      </CasingInformation>
      </ProposedCasingProgram>

      <reportRemark>Black Hills Exploration has a Statewide Bond. Bond # BF39002976</reportRemark>
      <reportRemark>Drilling Program and Surface Use Plan attached.</reportRemark>

      </BLM31603>



      Many Thanks in advance for your help!
      :)
        • 1. Re: Error: Error: XML Indexer: Fatal Parse error in document
          655560
          Hi,

          Only a suggestion for locating the problem. It seems that the cause is not xml document, but http connection. Maybe the connection of your enviornment failed at proxy, DNS issue or something like that?

          I've download change http://www.posc.org/ebiz/blmSamples/blm3160-3.dtd and place it on /tmp. Then change following line
          <!DOCTYPE BLM31603 SYSTEM "http://www.posc.org/ebiz/blmSamples/blm3160-3.dtd">
          to
          <!DOCTYPE BLM31603 SYSTEM "file:///tmp/blm3160-3.dtd">
          The document can be put by dbxml shell successfully now.

          Thanks,
          Rucong

          Edited by: rucong.zhao on Sep 24, 2009 8:24 PM
          • 2. Re: Error: Error: XML Indexer: Fatal Parse error in document
            721257
            Hi rucong,

            Thanks for your help! I will try that out later.
            :)
            • 3. Re: Error: Error: XML Indexer: Fatal Parse error in document
              885835
              hi, I also have same problem. I wanna to putDocument dblp.xml in the created container by using dbxml shell commands
              I faced this error:
              "stdin:18: putDocument failed, Error: Error: XML indexer: Fatal parse error in document at line 1, char 1. Parser message: invalid document structure <Document: dbp.xml>"

              the content of theat xml file is:

              <?xml version="1.0" encoding="ISO-8859-1"?>
              <!DOCTYPE dblp SYSTEM "file: dblp.dtd">
              <dblp>
              <mastersthesis mdate="2006-04-06" key="ms/Vollmer2006">
              <author>Stephan Vollmer</author>
              <title>Portierung des DBLP-Systems auf ein relationales Datenbanksystem und Evaluation der Performance.</title>
              <year>2006</year>
              <school>Diplomarbeit, Universit&auml;t Trier, FB IV, Informatik</school>
              <url>http://dbis.uni-trier.de/Diplomanden/Vollmer/vollmer.shtml</url>
              </mastersthesis>


              <mastersthesis mdate="2002-01-03" key="ms/Brown92">
              <author>Kurt P. Brown</author>
              <title>PRPL: A Database Workload Specification Language, v1.3.</title>
              <year>1992</year>
              <school>Univ. of Wisconsin-Madison</school>
              </mastersthesis>

              .
              .
              .


              </article>
              <article mdate="2003-11-19" key="journals/ai/Todd93">
              <author>Peter M. Todd</author>
              <title>Stephanie Forrest, ed., Emergent Computation: Self-Organizing, Collective, and Cooperative Phenomena in Natural and Artificial Computing Networks.</title>
              <pages>171-183</pages>
              <year>1993</year>
              <volume>60</volume>
              <journal>Artif. Intell.</journal>
              <number>1</number>
              <url>db/journals/ai/ai60.html#Todd93</url>
              </article>
              <article mdate="2003-11-19" key="journals/ai/KautzKS95">
              <author>Henry A. Kautz</author>
              <author>Michael J. Kearns</author>
              <author>Bart Selman</author>
              <title>Horn Approximations of Empirical Data.</title>
              <pages>129-145</pages>
              <year>1995</year>
              <volume>74</volume>
              <journal>Artif. Intell.</journal>
              <number>1</number>
              <url>db/journals/ai/ai60.html#Todd93</url>
              </article>
              </dblp>

              could you please help me.
              here or send me to this address please:
              marjanimohsen@yahoo.com
              Thanks,
              Mohsen
              • 4. Re: Error: Error: XML Indexer: Fatal Parse error in document
                655560
                Hi Mohsen,

                It looks like an encoding or document structure issue. Please try to:
                1) Refer to http://www.w3schools.com/xml/xml_encoding.asp. Use UTF-8 if possible.
                2) Use XML Lint tools to ensure the XML document structure is correct.

                If the issue still occur please send me (rucong.zhao@oracle.com) your xml file directly, I'll check it.

                Best regards,
                Rucong Zhao
                Oracle Berkeley DB XML