出现这样 java.lang.IllegalArgumentException: Cannot format given Object as a Number一串英文是什么意思,这是什么错误啊,我得到的数据类型是Double类型的 ,应该怎样改?
java.lang.IllegalArgumentException: Cannot format given Object as a Number意思是:
抛非法参数异常,不能格式化给出一个Number对象,有可能传的值的类型不对,简单就是格式化错误。
改成:
StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition pos) .
Formats the given Date into a date/time string and appends the result to the given StringBuffer.
1.Entity数据结构:
public static class SubEntity {
@Property("subName")
private String subName;
@Property("subDescription")
private String subDescription;
2.数据在mongo数据库中的存储格式:
"_id" : ObjectId("5940b1643db71d944c800445"),
"name" : "myEntity name test",
"description" : "myEntity description test",
"MapEntity" : {
"entity1" : [
{
"name" : "lance",
"description":"lance-description"
}
],
"entity2" : []
}
}