【发布时间】:2019-04-04 23:31:45
【问题描述】:
为什么我在尝试create table into table storage时会出现以下错误:
com.microsoft.azure.storage.StorageException:好的 在 com.microsoft.azure.storage.StorageException.translateException(StorageException.java:87) 在 com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:209) 在 com.microsoft.azure.storage.table.QueryTableOperation.performRetrieve(QueryTableOperation.java:178) 在 com.microsoft.azure.storage.table.TableOperation.execute(TableOperation.java:694) 在 com.microsoft.azure.storage.table.CloudTable.exists(CloudTable.java:888) 在 com.microsoft.azure.storage.table.CloudTable.createIfNotExists(CloudTable.java:290) 在 com.microsoft.azure.storage.table.CloudTable.createIfNotExists(CloudTable.java:265) 在 be.dela.gdprvault.test.StorageTestClient.getTableByName(StorageTestClient.groovy:25) 在 be.dela.gdprvault.logging.entity.ActionLogSystemSpec.getActionLogFromTableByPartitionAndRowKey(ActionLogSystemSpec.groovy:114) 在 be.dela.gdprvault.logging.entity.ActionLogSystemSpec.should 保存 ActionLog 实体到表存储(ActionLogSystemSpec.groovy:96) 引起:java.lang.NullPointerException 在 com.microsoft.azure.storage.table.TableDeserializer.parseJsonEntity(TableDeserializer.java:290) 在 com.microsoft.azure.storage.table.TableDeserializer.parseSingleOpResponse(TableDeserializer.java:203) 在 com.microsoft.azure.storage.table.QueryTableOperation.parseResponse(QueryTableOperation.java:143) 在 com.microsoft.azure.storage.table.QueryTableOperation$1.postProcessResponse(QueryTableOperation.java:236) 在 com.microsoft.azure.storage.table.QueryTableOperation$1.postProcessResponse(QueryTableOperation.java:193) 在 com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:155) ... 8 更多
docer-compose
azure-blob-storage:
image: arafato/azurite
ports:
- "10000:10000"
- "10002:10002"
volumes:
- data-volume:/opt/azurite/folder
CloudTable table = tableClient.getTableReference(tableName)
table.createIfNotExists() -- there is error
我按照https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-java的文章做了
【问题讨论】:
-
您是否确认连接字符串正确并正确创建
tableClient? -
您好,请发布您的具体 java 代码,以便我可以帮助您。
-
谢谢,我已经准备好代码transfiles.ru/9jeo3。运行 azure.storage.logging.entity.ActionLogSystemSpec。我尝试保存复杂的类 azure.storage.logging.entity.ActionLog,所以我将 ActionLog 转换为 ActionLogWrapper