Redis序列化问题

[ERROR] 2020-07-27 13:41:18,517 [com.jfinal.kit.LogKit.error(LogKit.java:75)] 获取缓存对象时发生错误:

java.lang.RuntimeException: java.io.IOException: java.lang.RuntimeException: class not found CLASSNAME: loader:ParallelWebappClassLoader

  context: map

  delegate: false

----------> Parent Classloader:

java.net.URLClassLoader@516be40f


at com.jfinal.plugin.redis.serializer.FstSerializer.valueFromBytes(FstSerializer.java:78)

at com.jfinal.plugin.redis.Cache.valueFromBytes(Cache.java:1217)

at com.jfinal.plugin.redis.Cache.get(Cache.java:91)

at cn.mapedu.map.base.utils.RedisUtil.get(RedisUtil.java:76)

at cn.mapedu.map.base.BaseController.getAppAccount(BaseController.java:569)

at cn.mapedu.map.controller.HomeController.listMenu(HomeController.java:21)

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:74)

at cn.mapedu.map.base.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:28)

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

at cn.mapedu.map.base.interceptor.CrossInterceptor.intercept(CrossInterceptor.java:16)

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

at cn.mapedu.base.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:45)

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

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

at cn.mapedu.routes.RouteHandler.handle(RouteHandler.java:22)

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

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

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

at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209)

at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244)

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

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

at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)

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

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

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

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

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

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

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

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)

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

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

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

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

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

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

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

Caused by: java.io.IOException: java.lang.RuntimeException: class not found CLASSNAME: loader:ParallelWebappClassLoader

  context: map

  delegate: false

----------> Parent Classloader:

java.net.URLClassLoader@516be40f


at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:242)

at com.jfinal.plugin.redis.serializer.FstSerializer.valueFromBytes(FstSerializer.java:75)

... 45 more

Caused by: java.lang.RuntimeException: class not found CLASSNAME: loader:ParallelWebappClassLoader

  context: map

  delegate: false

----------> Parent Classloader:

java.net.URLClassLoader@516be40f


at org.nustaq.serialization.FSTClazzNameRegistry.classForName(FSTClazzNameRegistry.java:234)

at org.nustaq.serialization.FSTClazzNameRegistry.classForName(FSTClazzNameRegistry.java:189)

at org.nustaq.serialization.FSTClazzNameRegistry.decodeClass(FSTClazzNameRegistry.java:172)

at org.nustaq.serialization.coders.FSTStreamDecoder.readClass(FSTStreamDecoder.java:472)

at org.nustaq.serialization.FSTObjectInput.readClass(FSTObjectInput.java:918)

at org.nustaq.serialization.FSTObjectInput.readObjectWithHeader(FSTObjectInput.java:342)

at org.nustaq.serialization.FSTObjectInput.readObjectFields(FSTObjectInput.java:694)

at org.nustaq.serialization.FSTObjectInput.instantiateAndReadNoSer(FSTObjectInput.java:548)

at org.nustaq.serialization.FSTObjectInput.readObjectWithHeader(FSTObjectInput.java:369)

at org.nustaq.serialization.FSTObjectInput.readObjectInternal(FSTObjectInput.java:326)

at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:306)

at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:240)

... 46 more

Caused by: java.lang.ClassNotFoundException: 

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:348)

at org.nustaq.serialization.FSTClazzNameRegistry.classForName(FSTClazzNameRegistry.java:196)

... 57 more

根据key获取缓存对象时候,报错。我把Redis中的数据全部清除之后还是报错,怎么回事啊

评论区

jounzhang

2020-07-27 16:06

jfinal初识

2020-07-27 16:09

@jounzhang 你知道怎么处理吗,搞了几个小时了,不知道原因出在哪里

錢勢惘導

2020-07-28 09:32

@jfinal初识 目测少了fst包

JFinal

2020-07-28 22:51

你用的 tomcat, 并且我不知道你如何配置的 tomcat,不好猜

热门反馈

扫码入社