chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Inouye, Brian" <Brian.Ino...@xerox.com>
Subject create service with a large content stream causes a "Limit exceeded!" exception
Date Thu, 27 Mar 2014 21:36:39 GMT
Hi,

I've run into a limitation in my CMIS Provider which uses OpenCMIS 0.10.0.  When a Client
sends a create request to my CMIS Provider and the accompanying content stream is large, say
1.4 GB, CappedInputStream raises an exception CmisInvalidArgumentException("Limit exceeded!").
 AtomEntryParser.java creates the CappedInputStream object, passing in a constant MAX_STREAM_LENGTH
which is set to 10 * 1024 * 1024.

public class CappedInputStream extends InputStream {
    ...
    private void checkLength() throws IOException {
        if (counter > max) {
            throw new CmisInvalidArgumentException("Limit exceeded!");
        }
    }
    ...
}

public class AtomEntryParser {
    ...
    private static final long MAX_STREAM_LENGTH = 10 * 1024 * 1024;
    ...
    public void parse(InputStream stream) throws XMLStreamException, IOException {
        ...
        cappedStream = new CappedInputStream(stream, MAX_STREAM_LENGTH);
        ...
    }
}

What can I do to prevent this exception from occurring?  I tried doubling the value, but the
exception still occurs.

... Brian ...
Brian Inouye, Xerox Corporation


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message