Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Gottcha: Beware dual Jforum initialization problems

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IMHO, This isn't really a bug more of a configuration gotcha. I thought I'd post it just to help anyone who gets caught.

In 2.1.6, both the Jforum and Install servlets extend the JforumBaseServlet class. (Haven't checked 2.1.7). If the Install servlet is initialized after the JForum servlet has been initialized, there will be a lot of cache related NPE problems, like MostUserEverOnline being null, SmiliesRepository problems.

This is because the JforumBaseServlet init method is called by both servlets. The base init method initialises the Cache engine. So, if it is called after the Jforum init method (which initialises the various repositories) the cached info gets cleared.

The solution is to do what the installation instructions suggest and remove the initialize servlet from the jForum web.xml (both servlet and mapping definitions).

FWIW, I found this by adding a <load-on-startup> web.xml condition to the the Jforum servlet. This setting will initialize Jforum on restart rather than delaying the first user's request. But this failed until I noticed two log messages from JForumBaseServlet.

Greg
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I remember correctly, this is fixed on 2.1.7

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic