Xerces C++ Bug Report:

Xerces-C++ version number:      1.5.1
Platform:        AIX
Operating system and version number:    4.3.3 Maintenance Level 9
Compiler and version number:    xlC 3.6.6.0
The XML document (or excerpt) that failed:      show description
The C++ application code that failed    show description
Whether you built the Xerces-C++ library
    yourself or used the binary distribution:   both testet, same error

What happened:

First C++ Code:
    SAX2DocHandler handler;
    handler.setControl(this, pPrnDM);
    parser->setContentHandler(&handler);
    parser->setErrorHandler(&handler);
  
    try
    {
        parser->parse(inFilename.c_str());
    }
    catch (const XMLException& e)
    {
        cerr << "\nError during parsing: \n"
            << "Exception message is:  \n"
            << StrX(e.getMessage()) << "\n" << endl;
        return false;
    }
    catch (...)
    {
        cerr << "\nUnexpected exception during parsing: \n";
        return false;
    }


That code is ok, and works very fine.
The Problem is about this:
Could Xerces C++ work with files larger 2 GB? 
The AIX can handle Files larger 2 GB, and we have much XML Files > 2 GB. (some are so 
about 16 GB)
We want to parse them per Xerces C++ parser,
and all works fine for files that are smaller 2 GB.
Only if the filesize is > 2 GB, we get an EXCEPTION at the 
parser->parse(inFilename.c_str()) that looks like:
Fatal Error at file , line 0, char 0
  Message: An exception occured! Type: RuntimeException, Message: The primary document 
entity could not be opend. Id=/test_d/dim/ddaten/xml/01s0000210519x001.xml

If I take a look into the file under AIX all XML looks right and well, the same as the 
other files that are going without problems. Only difference is as allready said the 
filesize.
We compiled and linked the whole in 32 Bit mode, for AIX there is a special option to 
enable file sizes > 2 GB (it is *D_LARGE_FILES).
So we recompiled the parser and all sourcecode with this option, but the error stays.
We debuged a bit into it, and found out that the function call of new 
BinFileInputStream fails in LocalFileInputSource.cpp.

BinInputStream* LocalFileInputSource::makeStream() const
{
    BinFileInputStream* retStrm = new BinFileInputStream(getSystemId());
    if (!retStrm->getIsOpen())
    {
        delete retStrm;
        return 0;
    }
    return retStrm;
}
How can we solve this problem?
Is the only way to compile the whole project in 64 bit mode?
Should it then work?

Please give us a hint and mail back to
[EMAIL PROTECTED]

thanks

Stefan Hummert


Stefan Hummert (SIS/hu)

Schober Informationssysteme GmbH
Max-Eyth-Stra�e 6-10
D-71254 Ditzingen
Tel.:   07156-304-493
Fax:   07156-304-310
EMail:  [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to