[Logo] JForum - Powering Communities
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


The final version of JForum 2.7.0 has been released with lots of improvements. Read all about it here

Strange problem only occurs after a day or so of uptime: RSS feed
Forum Index » Developer Forum
Author Message
pete


Joined: 2012/2/4
Messages: 3
Offline
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.


Joined: 2012/2/14
Messages: 2
Offline
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.


Joined: 2012/2/14
Messages: 2
Offline
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


Joined: 2012/2/4
Messages: 3
Offline
Ok, I just increased idle and live to 100000 seconds. Hope that fixes it. Thanks for your insight!q
andowson


Joined: 2011/6/30
Messages: 223
Offline
Thank you for your error report.
This issue #23 has been fixed in revision r183. Please help to test it.
 
Forum Index » Developer Forum
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer