Java SDK cannot parse Azurite response (Table)
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
### Which service(blob, file, queue, table) does this issue concern?
Table
### Which version of the Azurite was used?
3.9.0-table-alpha.1
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
### What's the Node.js version?
v14.15.4
### What problem was encountered?
When invoking `CloudTable.createIfNotExists` method against Azurite developmentStorageAccount I get an exception as below.
I use com.microsoft.azure:azure-storage:8.6.5 Java SDK (latest with support for Table Storage).
```
Caused by: com.microsoft.azure.storage.StorageException: OK
at com.microsoft.azure.storage.StorageException.translateException(StorageException.java:87)
at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:220)
at com.microsoft.azure.storage.table.QueryTableOperation.performRetrieve(QueryTableOperation.java:178)
at com.microsoft.azure.storage.table.TableOperation.execute(TableOperation.java:694)
at com.microsoft.azure.storage.table.CloudTable.exists(CloudTable.java:888)
at com.microsoft.azure.storage.table.CloudTable.createIfNotExists(CloudTable.java:290)
at com.microsoft.azure.storage.table.CloudTable.createIfNotExists(CloudTable.java:265)
at pl.mstrejczek.bucketer.adapters.table_storage.SessionDAO.createTable(SessionDAO.kt:102)
... 122 more
Caused by: java.lang.NullPointerException
at com.microsoft.azure.storage.table.TableDeserializer.parseJsonEntity(TableDeserializer.java:291)
at com.microsoft.azure.storage.table.TableDeserializer.parseSingleOpResponse(TableDeserializer.java:203)
at com.microsoft.azure.storage.table.QueryTableOperation.parseResponse(QueryTableOperation.java:143)
at com.microsoft.azure.storage.table.QueryTableOperation$1.postProcessResponse(QueryTableOperation.java:236)
at com.microsoft.azure.storage.table.QueryTableOperation$1.postProcessResponse(QueryTableOperation.java:193)
at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:166)
```
### Steps to reproduce the issue?
```
CloudStorageAccount cloudStorageAccount = CloudStorageAccount.getDevelopmentStorageAccount();
CloudTableClient cloudTableClient = cloudStorageAccount.createCloudTableClient();
CloudTable cloudTable = cloudTableClient.getTableReference("foo");
cloudTable.createIfNotExists();
cloudTable.createIfNotExists(); // this will fail - table already exists, Azure SDK cannot parse JSON response
```
Or simply grab https://github.com/mstrejczek/azurite-table-test and run `./gradlew run`
### Have you found a mitigation/solution?
Nope
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.