aspose file tools*
The moose likes JForum and the fly likes Why did redeploy fail? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Why did redeploy fail?" Watch "Why did redeploy fail?" New topic
Author

Why did redeploy fail?

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why did redeploy fail?