This week's book giveaway is in the Functional programming forum.
We're giving away four copies of Functional Design and Architecture and have Alexander Granin on-line!
See this thread for details.
Win a copy of Functional Design and Architecture this week in the Functional programming 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Why did redeploy fail?

Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I need some help to understand what is going wrong during a redeployment of my customized jforum.
I have customized jforum (changing some pages in templates/default and adding a SSO Module for OpenID)
Everything works very well. I can deploy and install my jforum as expected without any problems.
But I run into a problem when I redeploy my customized jform.

When I did a redeployment I walk thought the following steps:

1.) backup the /WEB-INF/config folder from my running instance.
2.) disable the running instance
3.) redeploy the jforum war file
4.) restore the /WEB-INF/config folder
5.) enable the war module again.

After these steps every thing looks ok. JFourm is running. MySQL Database is connected without any problems. No error messages in the log files. All the data generated before is available.

Now someone calls the /install.jsp page.
As in my config file "jforum-custom.conf" the parameter "installed" is set to "true" this request should result into a redirect to the forums/

But in this situation I got an exception

Now everytime the jfourm should display the "Who is online" section this exception is thrown.
After I restart the server this error is gone until someone calles the /install.jsp page again.

I can not understand wy this happens :-(
My only workarround so far is to remove the install.jsp page form the context root after the redeployment.

Who can explain me what is going wrong here?
I am running glassfish on a linux server and use MySQL.

Thanks for any help


[originally posted on by rsoika]
Migrated From
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The quick fix is to delete or rename the install.jsp file and remove the install servlet mapping from your web.xml.

The underlying issue seems to be that the InstallServlet will partially re-initialize the jForum environment in it's init method (well, in the class it's built on.). This is causing a lot of information that templates use to not be re-initialized. Most because the install servlet assumes that the db info is not available (since the app hasn't been installed).

The "right" way to fix it would probably be to modify the JForumBaseServlet.init method to set a ServletContext level flag that could be checked to see if an init was needed. Eg: add something like the code below to the init method.

[originally posted on by monroe]
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic