nutzam/nutz — Issue #118: fastInsert存在问题
Author: fjayblue
Created: 2011-11-23 16:00:00+00:00
State: open

直接看代码：
List> list = new ArrayList>();

Chain chain = null;
for (int i = 0; i < values.length; i++) {
if (i == 0) {
chain = Chain.make(cols[i], values[i]);
} else {
chain.add(cols[i], values[i]);
}
}
list.add(chain.toMap());

dao().fastInsert(list);

然后很欢快地报错鸟：
2011-11-23 23:59:23,618 [main] INFO org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:25)
--- Fail to value by getter
java.lang.IllegalAccessException: Class org.nutz.lang.eject.EjectByGetter can not access a member of class java.util.HashMap$Entry with modifiers "public final"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:261)
at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:253)
at java.lang.reflect.Method.invoke(Method.java:594)
at org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:21)
at org.nutz.json.entity.JsonEntityField.getValue(JsonEntityField.java:76)
at org.nutz.json.JsonRendering.pojo2Json(JsonRendering.java:184)
at org.nutz.json.JsonRendering.render(JsonRendering.java:273)
at org.nutz.json.JsonRendering.array2Json(JsonRendering.java:286)
at org.nutz.json.JsonRendering.render(JsonRendering.java:271)
at org.nutz.json.Json.toJson(Json.java:298)
at org.nutz.json.Json.toJson(Json.java:268)
at org.nutz.castor.castor.Array2String.cast(Array2String.java:24)
at org.nutz.castor.castor.Array2String.cast(Array2String.java:11)
at org.nutz.castor.Castors.cast(Castors.java:293)
at org.nutz.castor.Castors.castTo(Castors.java:349)
at org.nutz.castor.Castors.castToString(Castors.java:379)
at org.nutz.dao.impl.sql.NutStatement.toString(NutStatement.java:93)
at org.nutz.dao.impl.jdbc.NutPojo.toString(NutPojo.java:222)
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:147)
at org.nutz.dao.impl.DaoSupport$2.invoke(DaoSupport.java:181)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:30)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:178)
at com.ibiz.common.dao.CommonDao$$NUTZAOP._aop_invoke(Unknown Source)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:76)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:56)
at org.nutz.aop.interceptor.TransactionInterceptor$1.run(TransactionInterceptor.java:37)
at org.nutz.trans.Trans.exec(Trans.java:123)
at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:59)
at com.ibiz.common.dao.CommonDao$$NUTZAOP._exec(Unknown Source)
at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:50)
at org.nutz.dao.impl.NutDao.fastInsert(NutDao.java:135)
at com.ibiz.common.dao.CommonDao$$NUTZAOP._aop_invoke(Unknown Source)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:76)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:56)
at org.nutz.aop.interceptor.TransactionInterceptor$1.run(TransactionInterceptor.java:37)
at org.nutz.trans.Trans.exec(Trans.java:123)
at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:59)
at com.ibiz.common.dao.CommonDao$$NUTZAOP.fastInsert(Unknown Source)

当时就是这样子-.-