NutzCN Logo
精华 HttpServletRequest req 用JSON输出的时候出错
发布于 3190天前 作者 汉歌 2008 次浏览 复制 上一个帖子 下一个帖子
标签:
	@At
	@Ok("fm:template.admin.unit.${req_attr.tmpl}")
	public List<Plan> add(@Param("pid") long pid,  HttpServletRequest req) {
	    System.out.println (Json.toJson (req ) );
		req.setAttribute("tmpl", "add");
		List<Plan> list = planService.query(null, null);
		return list;
	}
Started Jetty Server
Starting scanner at interval of 10 seconds.
2016-04-02 10:58:29,101 [WARN][org.nutz.mvc.impl.processor.FailProcessor] - Error@/admin/unit/add :
java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:622)
	at java.lang.StringBuilder.append(StringBuilder.java:202)
	at org.nutz.lang.stream.StringWriter.write(StringWriter.java:23)
	at java.io.Writer.write(Writer.java:192)
	at java.io.Writer.write(Writer.java:157)
	at java.io.Writer.append(Writer.java:227)
	at org.nutz.json.impl.JsonRenderImpl.appendBraceEnd(JsonRenderImpl.java:189)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:315)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:305)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
	at org.nutz.json.impl.JsonRenderImpl.coll2Json(JsonRenderImpl.java:402)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:116)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:167)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:312)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:305)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:167)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:312)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:305)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
	at org.nutz.json.impl.JsonRenderImpl.coll2Json(JsonRenderImpl.java:402)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:116)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:167)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:312)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:305)
	at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
	at org.nutz.json.impl.JsonRenderImpl.appendPair(JsonRenderImpl.java:167)
	at org.nutz.json.impl.JsonRenderImpl.writeItem(JsonRenderImpl.java:312)
	at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:305)
4 回复

别对req对象执行toJson,死得很惨的

req里面的对象有几个循环圈

查看req里面的全部内容

org.nutz.lang.Dumps.HTTP.http(req, MODE.ALL);
添加回复
请先登陆
回到顶部