关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 13242|回复: 3

[Online开发] ehcache换成redis有很多问题~

[复制链接]
发表于 2018-6-15 11:28:36 | 显示全部楼层 |阅读模式
1. 按照官方帮助文档修改有以下问题

ehcache指定key清空缓存,Redis没有提供相同方法



Redis没有提供TagCache这个元素。

官网一笔带过 这种问题 要如何解决~~


 楼主| 发表于 2018-6-15 11:38:07 | 显示全部楼层
算了 我自己顶一下吧 简单看了看代码 应该是 这部分代码 漏写了吧
 楼主| 发表于 2018-6-15 14:18:36 | 显示全部楼层
把ehcache换成redis后,项目启动发生空指针异常
启动后输入密码点击登录 ,会调用如下图方法

这是 进入到切面方法如下图

在argTypes=arguments.getClass(); 这行发生了空指针
DEBUG各内容如下:
targetName    =  class org.jeecgframework.web.system.service.impl.SystemServiceImpl
methodName =  loginUserIsHasMenuAuth
arguments     =  [loginController.do?hplushome, null, 8a8ab0b246dc81120146dc8181950052, 8a8ab0b246dc81120146dc8180ba0017]

根据参数内容 当循环第二次的时候 会发生空指针异常。  
异常信息如下:
java.lang.NullPointerException        at org.jeecgframework.core.aop.RedisCacheAspect.aroundLogCalls(RedisCacheAspect.java:45)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)        at java.lang.reflect.Method.invoke(Unknown Source)        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)        at com.sun.proxy.$Proxy102.loginUserIsHasMenuAuth(Unknown Source)        at org.jeecgframework.core.interceptors.AuthInterceptor.preHandle(AuthInterceptor.java:113)        at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:134)        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:932)        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)        at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:152)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2522)        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2511)        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)        at java.lang.Thread.run(Unknown Source)

请高手指点

发表于 2018-6-22 14:47:43 | 显示全部楼层
下个版本会大重构,着急的话,可以先自己改造
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表