求大神教我下!为什么我一加上fastjson这个方法,就报下面的错啊?

求大神教我下!为什么我一加上fastjson这个方法,就报下面的错啊? 

之前用ssm做的时候直接就可以用,为啥到jfinal里面会报错啊?image.png

七月 29, 2017 2:38:12 下午 com.jfinal.core.ActionHandler error

严重: /goods/getGoodsList

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

at com.jfinal.aop.Invocation.invoke(Invocation.java:87)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:82)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:74)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.jfinal.aop.Invocation.invoke(Invocation.java:73)

... 18 more

Caused by: java.lang.Error: Unresolved compilation problem: 


at com.hrdyy.tools.FastJsonUtil.toJSONString(FastJsonUtil.java:20)

at com.hrdyy.controller.GoodsController.getGoodsList(GoodsController.java:63)

... 23 more


评论区

杜福忠

2017-07-29 16:21

导包?
试试 JsonKit.xxx 工具集

JFinal

2017-07-29 22:32

用一下 FastJson.getJson().toJson(...)

热门反馈

扫码入社