Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure ADLSGEN2 - API Error 400 - DatalakeStorageException The request URI is invalid

I'm using Azure SDK (Java) to create directory, upload files, move files in ADLSGEN2.

My input are very simple, it look like:

path : /path/to/fileOrFolder

But I got following Error:

com.azure.storage.file.datalake.models.DatalakeStorageException: Status Error code 400: The request URI is invalid ...
like image 421
tdebroc Avatar asked Nov 16 '25 04:11

tdebroc


1 Answers

I share the solution here, as it cost me several hours to 1 day of debugging ... for just this:

The problem was that I had a leading Slash in front of the path.

Solution: Remove the first slash at the beginning of the path:

Replace

/path/to/fileOrFolder

by

path/to/fileOrFolder

It's the same pattern for all action : upload, create directory, rename, delete, ...

I think Azure SDK should do the normalization itself or have a more comprehensive error message ...

like image 172
tdebroc Avatar answered Nov 18 '25 13:11

tdebroc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!