會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

Developer Forum » Strange problem only occurs after a day or so of uptime:

發表人: pete
10 年 前
I'm running on Tomcat 6, JDK 6, MySQL, Win7 x64. Restarting the server fixes this, but the problem occurs after about a day of uptime.

I'm hesitant to file a bug report because I'm using a database that I restored from a backup - not sure if this is possibly caused by some data integrity issue rather than a software bug.

Any ideas what I should look into, or whether I should file a defect?



Method public static java.lang.String net.jforum.repository.RankingRepository.getRankTitle(int,int) threw an exception

The problematic instruction:

----------

==> ${rank.getRankTitle(user.rankId, user.totalPosts)} [on line 10, column 9 in default/post_show_user_inc.htm]

in include "post_show_user_inc.htm" [on line 157, column 57 in default/post_show.htm]

----------



Java backtrace for programmers:

----------

freemarker.template.TemplateModelException: Method public static java.lang.String net.jforum.repository.RankingRepository.getRankTitle(int,int) threw an exception

at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:125)

at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)

at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)

at freemarker.core.Expression.getStringValue(Expression.java:93)

at freemarker.core.DollarVariable.accept(DollarVariable.java:76)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.Environment.include(Environment.java:1508)

at freemarker.core.Include.accept(Include.java:169)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)

at freemarker.core.Environment.visit(Environment.java:428)

at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.Environment.process(Environment.java:199)

at freemarker.template.Template.process(Template.java:237)

at net.jforum.JForum.processCommand(JForum.java:262)

at net.jforum.JForum.service(JForum.java:228)

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

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

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

at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)

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

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

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

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

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

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

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)

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

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

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

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

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

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

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

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

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NullPointerException

at net.jforum.repository.RankingRepository.getRankTitleByPosts(RankingRepository.java:126)

at net.jforum.repository.RankingRepository.getRankTitle(RankingRepository.java:111)

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 freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:866)

at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)

... 46 more

<!-- BEGIN ERROR STACK TRACE


Method public static java.lang.String net.jforum.repository.RankingRepository.getRankTitle(int,int) threw an exception

The problematic instruction:

----------

== ${rank.getRankTitle(user.rankId, user.totalPosts)} [on line 10, column 9 in default/post_show_user_inc.htm]

in include "post_show_user_inc.htm" [on line 157, column 57 in default/post_show.htm]

----------



Java backtrace for programmers:

----------

freemarker.template.TemplateModelException: Method public static java.lang.String net.jforum.repository.RankingRepository.getRankTitle(int,int) threw an exception

at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:125)

at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)

at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)

at freemarker.core.Expression.getStringValue(Expression.java:93)

at freemarker.core.DollarVariable.accept(DollarVariable.java:76)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.Environment.include(Environment.java:1508)

at freemarker.core.Include.accept(Include.java:169)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)

at freemarker.core.Environment.visit(Environment.java:428)

at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.MixedContent.accept(MixedContent.java:92)

at freemarker.core.Environment.visit(Environment.java:221)

at freemarker.core.Environment.process(Environment.java:199)

at freemarker.template.Template.process(Template.java:237)

at net.jforum.JForum.processCommand(JForum.java:262)

at net.jforum.JForum.service(JForum.java:228)

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

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

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

at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)

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

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

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

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

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

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

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)

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

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

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

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

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

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

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

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

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NullPointerException

at net.jforum.repository.RankingRepository.getRankTitleByPosts(RankingRepository.java:126)

at net.jforum.repository.RankingRepository.getRankTitle(RankingRepository.java:111)

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 freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:866)

at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)

... 46 more


URL is: /jforum/posts/list/7.page
END ERROR STACK TRACE-->

發表人: Markus S.
10 年 前
I faced the same problem. Clearing / reloading the ranking cache fixed the problem for the moment. But I'm not sure, if the problem is now completely gone or just suspended.

發表人: Markus S.
10 年 前
The problem still exists. The problem occurs, when the cache removes the list of rankings. When this happens, the list of entries gets null and a NullPointerExcpetion is thrown at net.jforum.repository.RankingRepository on line 126 while trying to iterate the list.
As a quickfix I increased the time to idle setting in ehcache.xml, so that the list is not removed so early from cache.

發表人: pete
10 年 前
Ok, I just increased idle and live to 100000 seconds. Hope that fixes it. Thanks for your insight!q

發表人: andowson
10 年 前
Thank you for your error report.
This issue #23 has been fixed in revision r183. Please help to test it.




會員註冊 / 登入  |  電腦版  |  Jump to top of page