Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-290

Error opening second file for parsing

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: XPathC
    • Labels:
      None
    • Environment:
      Operating System: Windows NT/2K
      Platform: PC
    • Bugzilla Id:
      21528

      Description

      Hello,

      I am a C++ programmer who is new to XML parsing, so please bear with me. We
      have set up a parsing method that works great when there is only one input
      file, but when we try to parse a second file (as we are looping thru all the
      files in the directory), the follow error is generated upon calling
      XalanDocument* l_XalanDocument = l_ParserLiaison.parseXMLStream
      (l_FileInputSource, l_identifier): Fatal Error at (file <unknown>, line 0,
      column 0): An exception occurred! Type:RuntimeException, Message:The primary
      document entity could not be opened. I
      d=C:\Program Files\Common Files\System\Mapi\1033
      \NT\AnnuityNet_In\20030508140024258JNBATCH0002TXN_JNT2.XML

      The guts of the function are pasted in below.

      I have tried for several days to resolve the problem, with no success. Not
      sure if this is a bug, or a problem with our methodology. Any help would be
      appreciated. Hopefully it is just something stupid that I am doing or not
      doing.

      Thanks,
      Charles Karpinski
      XalanSourceTreeDOMSupport l_SourceDOMSupport;

      l_SourceDOMSupport.reset();

      XalanSourceTreeParserLiaison l_ParserLiaison
      (l_SourceDOMSupport);

      l_ParserLiaison.reset();

      // Define Xalan/XML Resources to be used later
      XPathEvaluator l_XPathEvaluator;
      XPathEnvSupportDefault l_XPathEnvSupport;
      l_XPathEnvSupport.reset();
      XObjectFactoryDefault l_XObjectFactory;
      l_XObjectFactory.reset();
      XPathExecutionContextDefault l_ExecutionContext
      (l_XPathEnvSupport,

      l_SourceDOMSupport,

      l_XObjectFactory

      );
      l_ExecutionContext.reset();

      XPathFactoryDefault l_XPathFactory;
      l_XPathFactory.reset();
      XPathProcessorImpl l_XPathProcessor;
      XObjectPtr l_XPathObject;

      l_ParserLiaison.setExternalSchemaLocation(c_wstr
      (XalanDOMString(m_ExternalSchemaLocation.c_str())));
      // tell the parser liaison not to include ignorable
      whitespace
      l_ParserLiaison.setIncludeIgnorableWhitespace(false);
      // Combine the support and the liaison together
      l_SourceDOMSupport.setParserLiaison(&l_ParserLiaison);

      // Open file
      LocalFileInputSource l_FileInputSource(c_wstr
      (XalanDOMString(m_sVendorFileName.c_str())));

      XalanDOMString l_identifier; // for reporting of errors

      XalanDocument* l_XalanDocument =
      l_ParserLiaison.parseXMLStream(l_FileInputSource, l_identifier);

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              charles.karpinski@jnli.com Charles Karpinski
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: