大量的缓存方面的报错

07-10-24 houya
banq兄你好,我们采用jdon框架开发了一个web系统,在系统正常运行2天之后出现大规模的报错,如下。请求解决办法。

我们在数据库存采用了ibatis的缓存,使用oscache实现。 是否和这个有冲突,怎么取消jdon的缓存呢。 在modle中设置 setCache(false) 不能解决这个问题。

2007-10-24 11:28:31,422 [TP-Processor101] ERROR com.jdon.aop.interceptor.CacheInterceptor - [JdonFramework]CacheInterceptor Exception error:java.lang.NullPointerException

2007-10-24 11:28:31,435 [TP-Processor31] ERROR com.jdon.aop.interceptor.CacheInterceptor - [JdonFramework]CacheInterceptor Exception error:java.lang.NullPointerException

2007-10-24 11:28:31,436 [TP-Processor146] ERROR StandardWrapper[:controller] - Servlet.service() for servlet controller threw exception

java.lang.NullPointerException

at java.util.LinkedList.addBefore(LinkedList.java:635)

at java.util.LinkedList.addFirst(LinkedList.java:153)

at com.jdon.util.UtilCache.put(UtilCache.java:271)

at com.jdon.controller.cache.LRUCache.put(LRUCache.java:48)

at com.jdon.controller.cache.CacheManager.putObect(CacheManager.java:98)

at com.jdon.model.cache.ModelCacheManager.saveToCache(ModelCacheManager.java:68)

at com.jdon.model.cache.ModelCacheManager.setCache2(ModelCacheManager.java:82)

at com.jdon.model.ModelManagerImp.addCache(ModelManagerImp.java:152)

at com.jdon.strutsutil.ModelListAction.getModelList(ModelListAction.java:149)

at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:79)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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

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

at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)

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

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

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

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

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

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

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

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

at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)

at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745)

at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)

at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

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

banq
2007-10-24 14:00
用winrar将JdonFramework.jar中META-INF下aspect.xml解压出来,然后去除配置中cacheInterceptor,再将aspect.xml拖入winrar的JdonFramework.jar中META-INF下覆盖原来的。

<interceptor name="cacheInterceptor" class="com.jdon.aop.interceptor.CacheInterceptor" pointcut="services" />

或者下载最新的JdonFramework 5.1 发现你用的是老版本,老版本UtilCache中有些BUG.

JdonFramework缺省使用的是一个简单Cache,可以更换跟专业的ehcache或oscache,这样可以通过跟严格残酷的压力测试,今天刚刚更新,可以再下载一次,按照下面说明更改一下JdonFramework.jar中的container.xml就可以使用ehcache,如果再配合Terracotta(已经直接将ehcache分布式)这样多台分布式缓存,可以架设多台服务器同时运行,这样性能处理能力是可拓展的:

http://www.jdon.com/jivejdon/forum/messageList.shtml?thread=32694&message=23110878#23110878

[该贴被banq于2007-10-25 12:06修改过]

[该贴被banq于2007-11-16 21:25修改过]

houya
2007-10-25 12:52
很高兴banq的回答。我用的jdonframework版本是4.0的,如果直接升级到5.1,会有问题吗。

banq
2007-10-30 14:33
只要升级JDK1.4到JDK5.0就可以使用最新版本。

不过如果使用encache,那么就不必升级5.0新版本,按照手册直接升级即可。

[该贴被banq于2007-10-30 15:42修改过]

猜你喜欢