项目启动之后,操作都很正常,大概过了5分钟左右。就会报错。因为我每访问一次都会去redis中获取当前登录的用户信息。然后就出现错误了。debug看了下,发现redis可以正常获取到数据,但是执行valueFromBytes()出错了。
FstSerializer.valueFromBytes().
具体报错信息如下:
java.lang.RuntimeException: java.io.IOException: java.lang.RuntimeException: unknown object tag -19 at com.jfinal.plugin.redis.serializer.FstSerializer.valueFromBytes(FstSerializer.java:78) at com.jfinal.plugin.redis.Cache.valueFromBytes(Cache.java:1211) at com.jfinal.plugin.redis.Cache.get(Cache.java:91) at com.chinatwse.wineage.commons.tools.ToolCache.get(ToolCache.java:47) at com.chinatwse.wineage.core.admin.service.AdministratorService.getCache(AdministratorService.java:130) at com.chinatwse.wineage.core.admin.service.AdministratorService$$FastClassByCGLIB$$88570c08.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at com.jfinal.aop.Invocation.invoke(Invocation.java:80) at com.jfinal.aop.Callback.intercept(Callback.java:85) at com.chinatwse.wineage.core.admin.service.AdministratorService$$EnhancerByCGLIB$$863c200f.getCache(<generated>) at com.chinatwse.wineage.core.interceptor.AuthAdminInterceptor.getCurrAdministrator(AuthAdminInterceptor.java:285) at com.chinatwse.wineage.core.interceptor.AuthAdminInterceptor.intercept(AuthAdminInterceptor.java:65) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74) at com.chinatwse.wineage.manage.handler.ManageHandler.handle(ManageHandler.java:69) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2508) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2497) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 2016-12-21 16:27:12[ERROR]-[Thread: http-apr-8081-exec-4]-[com.jfinal.core.ActionHandler.handle()]: /modules/custom/announce?v=4.0 java.lang.RuntimeException: java.io.IOException: java.lang.RuntimeException: unknown object tag -19 at com.jfinal.plugin.redis.serializer.FstSerializer.valueFromBytes(FstSerializer.java:78) at com.jfinal.plugin.redis.Cache.valueFromBytes(Cache.java:1211) at com.jfinal.plugin.redis.Cache.get(Cache.java:91) at com.chinatwse.wineage.commons.tools.ToolCache.get(ToolCache.java:47) at com.chinatwse.wineage.core.admin.service.AdministratorService.getCache(AdministratorService.java:130) at com.chinatwse.wineage.core.admin.service.AdministratorService$$FastClassByCGLIB$$88570c08.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at com.jfinal.aop.Invocation.invoke(Invocation.java:80) at com.jfinal.aop.Callback.intercept(Callback.java:85) at com.chinatwse.wineage.core.admin.service.AdministratorService$$EnhancerByCGLIB$$863c200f.getCache(<generated>) at com.chinatwse.wineage.core.interceptor.AuthAdminInterceptor.getCurrAdministrator(AuthAdminInterceptor.java:285) at com.chinatwse.wineage.core.interceptor.AuthAdminInterceptor.intercept(AuthAdminInterceptor.java:65) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74) at com.chinatwse.wineage.manage.handler.ManageHandler.handle(ManageHandler.java:69) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2508) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2497) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: java.lang.RuntimeException: unknown object tag -19 at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:243) at com.jfinal.plugin.redis.serializer.FstSerializer.valueFromBytes(FstSerializer.java:75) ... 33 more Caused by: java.lang.RuntimeException: unknown object tag -19 at org.nustaq.serialization.FSTObjectInput.instantiateSpecialTag(FSTObjectInput.java:430) at org.nustaq.serialization.FSTObjectInput.readObjectWithHeader(FSTObjectInput.java:360) at org.nustaq.serialization.FSTObjectInput.readObjectFields(FSTObjectInput.java:701) at org.nustaq.serialization.FSTObjectInput.instantiateAndReadNoSer(FSTObjectInput.java:555) at org.nustaq.serialization.FSTObjectInput.readObjectWithHeader(FSTObjectInput.java:370) at org.nustaq.serialization.FSTObjectInput.readObjectInternal(FSTObjectInput.java:327) at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:307) at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:241) ... 34 more
请大神帮我看下...非常感谢
项目:JFinal
因为 jfinal 默认用的 FST 做的数据序列化与反向序列化,这两个操作需要互相可逆