Files larger than 2 GB cannot be uploaded

Description

Files larger than 2 GB cannot be uploaded. After the upload is finished one can read the following error in the logs:

[ Thread-172] ERROR fileupload.MCRUploadHandlerIFS - Error while uploading file: DVD1.iso
java.lang.IllegalArgumentException: Size exceeds Integer.MAX_VALUE
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:828)
at org.mycore.datamodel.niofs.ifs1.MCRFileChannel.updateMetadata(MCRFileChannel.java:74)
at org.mycore.datamodel.niofs.ifs1.MCRFileChannel.implCloseChannel(MCRFileChannel.java:62)
at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
at java.nio.channels.Channels$1.close(Channels.java:178)
at java.nio.file.Files.copy(Files.java:2855)
at java.nio.file.CopyMoveHelper.copyToForeignTarget(CopyMoveHelper.java:126)
at java.nio.file.Files.copy(Files.java:1230)
at org.mycore.frontend.fileupload.MCRUploadHandlerIFS.receiveFile(MCRUploadHandlerIFS.java:187)
at org.mycore.frontend.fileupload.MCRUploadServlet.handleUpload(MCRUploadServlet.java:174)
at org.mycore.frontend.fileupload.MCRUploadServlet$1.run(MCRUploadServlet.java:214)
at java.lang.Thread.run(Thread.java:745)

Environment

None

Assignee

Thomas Scheffler

Reporter

Silvio Hermann

Labels

None

URL

None

External issue ID

None

Sprint

None

Fix versions

Affects versions

Priority

Highest
Configure