我想从Android项目中使用下面的代码从天蓝色的表中读取数据。NoClassDefFoundError无法从天蓝色的表中获取数据
TableQuery<Observation> rangeQuery =
TableQuery.from(Observation.class)
.where(combinedFilter);
Iterable<Observation> results = cloudTable.execute(rangeQuery);
// Loop through the results, displaying information about the entity
for (Observation entity : results) {
res.add(entity);
}
当我试图枚举results
它抛出java.lang.NoClassDefFoundError: com.fasterxml.jackson.core.JsonFactory
例外。
一个表实体看起来是这样的:
{"PartitionKey":"temperature",
"RowKey":"2014-12-19 23:15:19",
"Timestamp":"2014-12-19T23:15:20.2638537Z",
"humidity":38.0,
"temp":22.0,
"datetime":"2014-12-19 23:15:19"}
而且相应的类是:
public class Observation extends TableServiceEntity {
String temp;
String humidity;
String datetime;
String PartitionKey;
String RowKey;
String Timestamp;
}
我怀疑这是一个序列化错误。但是我看不出任何错误,因为所有的属性都在Observation类中实现。
你可以尝试在你的班级中将“湿度”和“温度”类型转换为“双倍”还是相当于? –