• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
Hi

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/list.page.

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

ralph

[originally posted on jforum.net by rsoika]
 
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
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 jforum.net by monroe]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic