guo1362112501 2013-11-20 03:02
浏览 2121

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; 
}

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥15 stable diffusion
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿