JdonFramework的自带缓存问题(板桥先生进)?

11-04-02 weili0677
         

使用SJH做的项目,在长时间运行或者大量访问后老是会报如下的错误,并且一直在跳:

请问板桥先生,这是怎么回事?

我也在论坛中找到有一个人也是同样的问题(贴子:http://www.jdon.com/jivejdon/thread/32901),板桥先生的建议是关掉Jdon的自带缓存(修改aspect.xml),但是按照板桥先生的建议关闭后会直接报aop错误,本人是java新手,还望板桥先生详细指点。谢谢。

2011-04-01 08:54:42,156 [http-3251-exec-36] WARN  com.jdon.util.Debug - 
java.lang.NullPointerException
	at com.jdon.util.LRUCache.put(LRUCache.java:47)
	at com.jdon.controller.cache.CacheManager.putObect(CacheManager.java:99)
	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.aop.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:71)
	at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvocation.java:84)
	at com.jdon.aop.AopClient.invoke(AopClient.java:95)
	at com.jdon.bussinessproxy.dyncproxy.DynamicProxyWeaving.invoke(DynamicProxyWeaving.java:62)
	at $Proxy5.getF0101(Unknown Source)
	at cu.zb.ps.SenderListAction.findModelByKey(SenderListAction.java:101)
	at com.jdon.strutsutil.ModelListAction.findModelIFByKey(ModelListAction.java:271)
	at com.jdon.strutsutil.ModelListAction.fetchModel(ModelListAction.java:230)
	at com.jdon.strutsutil.ModelListAction.getModelList(ModelListAction.java:182)
	at com.jdon.strutsutil.ModelListAction.setModellistByKey(ModelListAction.java:88)
	at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:59)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at cu.zb.filter.UserLoginFilter.doFilter(UserLoginFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.jdon.persistence.hibernate.CloseSessionInViewFilter.doFilter(CloseSessionInViewFilter.java:43)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:282)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:357)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1687)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
<p>

         

banq
2011-04-02 09:51

2011年04月02日 09:13 "

weili0677"的内容

java.lang.NullPointerException

at com.jdon.util.LRUCache.put(LRUCache.java:47) ...

可能是你的JF版本有点低,我在47行没有看到代码,只有49行:

public void put(Object key, Object value) {

cache.put(key, value);

}

建议:

1.先下载使用最新JF

2.是不是ehcache等jar包没有,没有缓存报错。

weili0677
2011-04-02 10:01

谢谢板桥先生的回复

我是下载了JdonRails和struts1+hibernate_lib

然后以里面的mysjh为基础做的项目

难道struts1+hibernate_lib里面的jf版本是比较低的?还要用6.2.3的jf去替换吗?

banq
2011-04-02 10:03

2011年04月02日 10:01 "weili0677"的内容
难道struts1+hibernate_lib里面的jf版本是比较低的?还要用6.2.3的jf去替换吗? ...

是的,一般案例中的版本都比较低,都要用最新版本替代,本想用Maven,但担心对初学者有些麻烦,所幸jf版本更新不算太快。

weili0677
2011-04-02 10:06

好的,谢谢板桥先生。我先试试去啦。。

3Go 1 2 3 下一页