jfinal微信开发获取微信用户信息报错

java.lang.NoClassDefFoundError: org/objenesis/Objenesis
	at org.nustaq.serialization.FSTObjectOutput.<init>(FSTObjectOutput.java:74)
	at com.jfinal.plugin.redis.serializer.FstSerializer.valueToBytes(FstSerializer.java:54)
	at com.jfinal.plugin.redis.Cache.valueToBytes(Cache.java:1191)
	at com.jfinal.plugin.redis.Cache.setex(Cache.java:78)
	at com.jfinal.weixin.sdk.cache.RedisAccessTokenCache.set(RedisAccessTokenCache.java:30)
	at com.jfinal.weixin.sdk.api.AccessTokenApi.refreshAccessToken(AccessTokenApi.java:112)
	at com.jfinal.weixin.sdk.api.AccessTokenApi.refreshAccessTokenIfNecessary(AccessTokenApi.java:77)
	at com.jfinal.weixin.sdk.api.AccessTokenApi.getAccessToken(AccessTokenApi.java:44)
	at com.jfinal.weixin.sdk.api.AccessTokenApi.getAccessTokenStr(AccessTokenApi.java:66)
	at com.jfinal.weixin.sdk.api.UserApi.getUserInfo(UserApi.java:36)
	at com.wcsmia.web.api.interceptor.WechatLoginInterceptor.get_wx_info(WechatLoginInterceptor.java:90)
	at com.wcsmia.web.api.interceptor.WechatLoginInterceptor.intercept(WechatLoginInterceptor.java:50)
	at com.jfinal.aop.Invocation.invoke(Invocation.java:67)
	at com.wcsmia.web.api.interceptor.ApiJsonInterceptor.intercept(ApiJsonInterceptor.java:9)
	at com.jfinal.aop.Invocation.invoke(Invocation.java:67)
	at com.wcsmia.web.api.interceptor.ApiInterceptor.intercept(ApiInterceptor.java:14)
	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.ClassNotFoundException: org.objenesis.Objenesis
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:430)
	at com.jfinal.server.JFinalClassLoader.loadClass(JFinalClassLoader.java:53)
	... 42 more


评论区

clfjava

2019-02-23 15:50

大佬解答下呗

clfjava

2019-02-23 16:11

JFinal

2019-02-23 16:21

你用到了 RedisPlugin,打开 jfinal 项目的 pom.xml,里头有 jedis 的三个依赖,加上即可

clfjava

2019-02-23 16:25

@JFinal 哪三个依赖呢

杜福忠

2019-02-23 17:00

@小鸡 java.lang.NoClassDefFoundError: org/objenesis/Objenesis

Dreamlu

2019-02-25 11:06

@小鸡 https://gitee.com/jfinal/jfinal-weixin/wikis/JFinal%20weixin%201.6%20Jar%E4%BE%9D%E8%B5%96?sort_id=10001

热门反馈

扫码入社