Mateusz Kluska created JCR-4138:
-----------------------------------
Summary: Not able to upload a large file (2 GB) via Jackrabbit to
an Oracle Database
Key: JCR-4138
URL: https://issues.apache.org/jira/browse/JCR-4138
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-core, jackrabbit-data
Affects Versions: 2.14.0
Reporter: Mateusz Kluska
Attachments: log.txt
I have configured jackrabbit datastore to Oracle database. I use JCR Api and
when I upload file greater or Equal 2GB I get following error(attachment
log.txt).
The problem is in class 'org.apache.jackrabbit.core.util.db.ConnectionHelper'
and method 'execute' where is called method setBinaryStream. There stream size
is cast to int. That caused a problem when stream size is bigger than max int
(2GB or grater). You should use
[this|https://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp2/DelegatingPreparedStatement.html#setBinaryStream-int-java.io.InputStream-long-]
method there instead of casting. Ojdbc also handle long binary stream size.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)