You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Tinny Ng <tn...@ca.ibm.com> on 2002/05/07 17:51:29 UTC

Re: Xerces problem with large files > 2GB

Stefan,

> Is the only way to compile the whole project in 64 bit mode?
> Should it then work?

FYI.   We just have a 64 bit AIX binary distribution available in the
nightly build:

http://xml.apache.org/dist/xerces-c/nightly/2002-05-06/xerces-c_2002-05-06-A
IX51_5.02_64.tar.gz

You may want to try this out with your large files and see if it works.

Tinny
----- Original Message -----
From: "Stefan Hummert" <St...@SCHOBER.DE>
To: <xe...@xml.apache.org>
Sent: Tuesday, April 30, 2002 5:58 AM
Subject: Xerces problem with large files > 2GB


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
stefan.hummert@schober.de

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:  stefan.hummert@schober.de


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org