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

Reply via email to