jfinal weixin api中的自定义菜单和模板怎么用,一直是json转换出错的问题

六月 13, 2018 11:55:17 上午 com.jfinal.kit.LogKit warn

警告: retry on 1 times v = null

java.lang.RuntimeException: java.lang.RuntimeException: jfinal 3.3默认 json 实现暂不支持 json 到 object 的转换,建议使用 active recrord 的 Generator 生成 base model,再通过 me.setJsonFactory(new MixedJsonFactory()) 来支持

at com.jfinal.weixin.sdk.api.AccessToken.<init>(AccessToken.java:52)

at com.jfinal.weixin.sdk.api.AccessTokenApi$1.call(AccessTokenApi.java:102)

at com.jfinal.weixin.sdk.api.AccessTokenApi$1.call(AccessTokenApi.java:1)

at com.jfinal.weixin.sdk.utils.RetryUtils.retryOnException(RetryUtils.java:32)

at com.jfinal.weixin.sdk.api.AccessTokenApi.refreshAccessToken(AccessTokenApi.java:97)

at com.jfinal.weixin.sdk.api.AccessTokenApi.getAccessToken(AccessTokenApi.java:57)

at com.jfinal.weixin.sdk.api.AccessTokenApi.getAccessTokenStr(AccessTokenApi.java:83)

at com.jfinal.weixin.sdk.api.MenuApi.createMenu(MenuApi.java:38)

at com.jfinal.weixin.demo.WeixinApiController.createMenu(WeixinApiController.java:64)

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)

at com.jfinal.weixin.sdk.jfinal.ApiInterceptor.intercept(ApiInterceptor.java:28)

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

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

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

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

at org.eclipse.jetty.server.Server.handle(Server.java:365)

at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)

at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)

at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)

at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)

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

Caused by: java.lang.RuntimeException: jfinal 3.3默认 json 实现暂不支持 json 到 object 的转换,建议使用 active recrord 的 Generator 生成 base model,再通过 me.setJsonFactory(new MixedJsonFactory()) 来支持

at com.jfinal.json.JFinalJson.parse(JFinalJson.java:341)

at com.jfinal.weixin.sdk.utils.JsonUtils.parse(JsonUtils.java:106)

at com.jfinal.weixin.sdk.api.AccessToken.<init>(AccessToken.java:34)

... 40 more


六月 13, 2018 11:55:17 上午 com.jfinal.kit.LogKit error

严重: retry on 1 times but not matching v = null

六月 13, 2018 11:55:17 上午 com.jfinal.kit.LogKit warn

警告: retry on 2 times v = null

U73CF3U]P%6@MZF5~X{VT0G.png

评论区

JFinal

2018-06-14 11:21

好久不做这个了,看一下文档:
https://gitee.com/jfinal/jfinal-weixin/wikis/Home

amote

2018-07-09 17:19

你好,这个错误是怎么解决的呢

zhouhe

2019-05-21 16:08

怎么解决的?

zhouhe

2019-05-21 16:08

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.jfinal.weixin.sdk.utils.JsonUtils
at com.jfinal.weixin.sdk.api.SnsAccessToken.(SnsAccessToken.java:4

热门反馈

扫码入社