2 guo1362112501 guo1362112501 于 2013.11.20 11:02 提问

Error marshalling java.util.Date: For input string: "2013-09-10%2013%3A09"

时间文本框:

通过dwr获取res,向表单传值:
res[0] = [{devNo:res[0].devNo,sleepTime:res[0].sleepTime,syncTime:formatDate(res[0].syncTime,'yyyy-mm-dd HH:nn'),safeTime:formatDate(res[0].safeTime,'HH:nn'),warmCount:res[0].warmCount,limitDl:res[0].limitDl}];

获取数据的方法:
public List queryDevInitParam(String dn, boolean bool) {
isQueryDev=false;
User user = UserUtil.getCurrentUser();
if (user == null || user.getPowerSupply() == null || dn == null)
return Collections.EMPTY_LIST;
// this.packQueryDev(dn);

        StringBuffer sb = new StringBuffer(
                "select d.id as id, d.dev_no as devNo,d.sleep_time as sleepTime,"
                        + "d.sync_time as syncTime,d.safe_time as safeTime,d.warm_count as warmCount,d.limit_dl as limitDl"
                        + " from t_dev_param d where d.dev_no=:dn");
        Map params = new HashMap();
        params.put("dn", dn);
        Map sc = new HashMap();
        sc.put("id", Hibernate.STRING);
        sc.put("devNo", Hibernate.STRING);
        sc.put("sleepTime", Hibernate.INTEGER);
        sc.put("syncTime", Hibernate.TIMESTAMP);
        sc.put("safeTime", Hibernate.TIMESTAMP);
        sc.put("warmCount", Hibernate.INTEGER);
        sc.put("limitDl", Hibernate.INTEGER);
        HibernateCallback action = HibernateCallbackUtil.getNativeCallback(
                sb, params, false, sc, Transformers.ALIAS_TO_ENTITY_MAP);
        List res = (List) hibernateTemplate.execute(action);

        return res; 
}

问什么回报错呢?????

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!