执行这个方法报异常,排查了下原因,是因为方法的名称是 toJson() 造成的,改成其他名称就好了,这应该是个bug。
```js\n
public String toJson() {
return String.format("/*%s*/%s", super.toString(),
Json.toJson(this, JsonFormat.compact()));
}
\n```
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
at com.young.seagull.base.BaseBean.toJson(BaseBean.java:44)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:236)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:125)
at org.nutz.json.Json.toJson(Json.java:225)
at org.nutz.json.Json.toJson(Json.java:187)
添加回复
请先登陆