While trying to run the simple example from Storage-blobs-java-v10-quickstart and using the reference listed in API reference document as:
String accountName = "acsazurestore";
String accountKey = "qjC6s44AmSbAkJ7Xqdsks/jjZDIYRTY8qg...."; [not the full one]
SharedKeyCredentials sharedKeyCredentials = new SharedKeyCredentials(accountName, accountKey);
While compiling (mvn compile exec:java
), the program fails with the below error message:
Caused by: java.lang.IllegalArgumentException: Input byte array has wrong 4-byte ending unit
at java.util.Base64$Decoder.decode0(Base64.java:704)
at java.util.Base64$Decoder.decode(Base64.java:526)
at java.util.Base64$Decoder.decode(Base64.java:549)
at com.microsoft.azure.storage.blob.SharedKeyCredentials.<init>(SharedKeyCredentials.java:60)
at quickstart.Quickstart.main(Quickstart.java:162)
Appreciate any help!