行云无鸣

2008-05-16

NeoDatis ODB中不支持带Boolean/boolean型的成员变量

Filed under: 未分类 — 标签:, , , , — hellyguo @ 09:45

在项目中使用了NeoDatis1.8.1,在存入某对象后,发现无法取出,报:

Caused by: org.neodatis.odb.ODBRuntimeException:
ODB Release : 427 – 17/04/2008 21:08:08 – th=TP-Processor3
225:Native java.lang.Boolean in Collection(List,array,Map) not supported
at org.neodatis.odb.core.introspector.InstanceBuilder.buildOneInstance(InstanceBuilder.java:364)
at org.neodatis.odb.core.introspector.InstanceBuilder.buildOneInstance(InstanceBuilder.java:67)
at org.neodatis.odb.core.introspector.InstanceBuilder.buildArrayInstance(InstanceBuilder.java:115)
at org.neodatis.odb.core.introspector.InstanceBuilder.buildOneInstance(InstanceBuilder.java:225)
at org.neodatis.odb.core.introspector.InstanceBuilder.buildOneInstance(InstanceBuilder.java:239)
at org.neodatis.odb.core.introspector.InstanceBuilder.buildOneInstance(InstanceBuilder.java:64)
at org.neodatis.odb.core.introspector.InstanceBuilder.buildMapInstance(InstanceBuilder.java:138)
at org.neodatis.odb.core.introspector.InstanceBuilder.buildOneInstance(InstanceBuilder.java:228)
at org.neodatis.odb.core.server.ClientStorageEngine.buildInstances(ClientStorageEngine.java:431)
at org.neodatis.odb.core.server.ClientStorageEngine.getObjects(ClientStorageEngine.java:532)
at org.neodatis.odb.main.ODBAdapter.getObjects(ODBAdapter.java:166)
… 20 more

查看了自己的类,没有发现放入Boolean型作为成员变量

但每次跟踪,的确可以发现有Boolean型被创建

再三查找后,发现原来某成员变量的子成员变量中,包含java.util.Calendar对象,该对象中包含bool成员变量。

原因找到,回避该java.util.Calendar对象,问题得到解决

%d 博主赞过: