-
Type: Bug
-
Status: Resolved
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 10.10-HF42
-
Fix Version/s: 10.10-HF54, 2021.10
-
Component/s: Core MongoDB, Rest API
-
Release Notes Summary:Batch Upload works with GridFS binary manager.
-
Tags:
-
Backlog priority:900
-
Sprint:nxplatform #45
Starting at HF42+, if using gridfsbinaries, batch upload fails with the following error
2021-09-21T14:08:05,791 ERROR [http-nio-0.0.0.0-8080-exec-3] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] java.lang.NullPointerException java.lang.NullPointerException: null at org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager.isValidDigest(AbstractBinaryManager.java:209) ~[nuxeo-core-api-10.10-HF52.jar:?] at org.nuxeo.ecm.core.blob.binary.BinaryBlobProvider.fixupDigest(BinaryBlobProvider.java:159) ~[nuxeo-core-api-10.10-HF52.jar:?] at org.nuxeo.ecm.core.blob.binary.BinaryBlobProvider.writeBlob(BinaryBlobProvider.java:139) ~[nuxeo-core-api-10.10-HF52.jar:?] at org.nuxeo.ecm.core.storage.mongodb.GridFSBinaryManager.writeBlob(GridFSBinaryManager.java:254) ~[nuxeo-core-storage-mongodb-10.10-HF49.jar:?] at org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore.putBlobs(KeyValueBlobTransientStore.java:493) ~[nuxeo-core-cache-10.10-HF48.jar:?] at org.nuxeo.ecm.automation.server.jaxrs.batch.Batch.addFile(Batch.java:185) ~[nuxeo-automation-server-10.10-HF49.jar:?] at org.nuxeo.ecm.restapi.server.jaxrs.BatchUploadObject.addBlob(BatchUploadObject.java:332) ~[nuxeo-rest-api-server-10.10-HF42.jar:?] at org.nuxeo.ecm.restapi.server.jaxrs.BatchUploadObject.uploadNoTransaction(BatchUploadObject.java:279) ~[nuxeo-rest-api-server-10.10-HF42.jar:?] at org.nuxeo.ecm.restapi.server.jaxrs.BatchUploadObject.upload(BatchUploadObject.java:187) ~[nuxeo-rest-api-server-10.10-HF42.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.19.4.jar:1.19.4] at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.19.4.jar:1.19.4] at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.19.4.jar:1.19.4]
Steps to Reproduce
1. Setup nuxeo instance using mongodb and gridfsbinaries
2. Install HF42 or newer
3. Initialize batch API:
curl -u Administrator:Administrator -X POST http://NUXEO_SERVER/nuxeo/api/v1/upload
4. Upload a file using batch API:
curl -u Administrator:Administrator -X POST -H "X-File-Name:myFile.doc" -H "X-File-Type:application/msword" -T myFile.doc http://NUXEO_SERVER/nuxeo/api/v1/upload/<myBatchId>/0
Expected Results: Successfully uploads file
Actual Results: Batch upload fails with above error
If you uninstall HF42, the batch upload works with gridfsbinaries.
If you are on HF42+, removing the gridfsbinaries from nuxeo.templates allows batch upload to work