Upgrading ViewsFlash

Upgrading to ViewsFlash 9 from versions 6 and higher

NEW: Detailed upgrade instructions at the end of this page. Read these general considerations first.

Summary: ViewsFlash does not coexist simultaneously with earlier releases. If you have two or more instances of ViewsFlash sharing the same database, shut down all instances before upgrading, and upgrade ViewsFlash on all instances. When you upgrade, all data is upgraded automatically. Backup the database before upgrading.

The upgrade process consists of reviewing the servlet parameters, shutting down the ViewsFlash application, upgrading the ViewsFlash application with the new ViewsFlash.war file, and bringing the application back up.

For upgrading from version 7 to 8, just upgrade the ViewsFlash.war file.

Click here if you are Upgrading from versions older than ViewsFlash 6.

Changes to be aware of before upgrading to ViewsFlash 8 from version 6:

Uploaded attachments are now stored in the database by default, rather than the file system, and attachments are copied from the file system to the database's VWFOBJECTS table automatically upon startup. To prevent this and continue with the legacy behavior of storing attachments in the file system, see Attachments for the exact servlet parameters to use.

When using Oracle as the ViewsFlash database, note the following change.

If you were using database=Oracle, Oracle9,Oracle10, or Oracle11, and you did not specify a databaseextension parameter, a databaseextension parameter of "OracleDatabaseExtension" was used by default. In ViewsFlash 7, a new default is used, namely: OracleDatabaseExtension, Oracle9DatabaseExtension,Oracle10DatabaseExtension, or Oracle11DatabaseExtension. The effect of this change is that a new column, ANSWERCLOB, of type CLOB, is added to the VWFDATA table. This column is used to store data from text fields, allowing storage of very large text fields automatically. Data that has already been stored in the VWFDATA table is automatically moved to the new column when necessary. To prevent this change and to use the legacy behavior, provide explicitly the servlet parameter:
databaseextension=OracleDatabaseExtension.
If the ViewsFlash application's database user has the right to CREATE and ALTER tables, the new column will be added automatically. Otherwise, create the new column manually using:
ALTER TABLE VWFDATA ADD ( ANSWERCLOB CLOB );

If the application's database user does not have the CREATE TABLE right, look at the appropriate *.sql files inside the WEB-INF/sql directory in ViewsFlash.war, and create the EXAMPLES_CAR_BRANDS table using the SQL DDL provided there before upgrading.

After downloading the ViewsFlash.war file, examine its WEB-INF/web.xml file and compare it to your deployed web.xml. If they are identical, you can simply redeploy the new war file. If you have made changes to your web.xml file, the easiest way to upgrade is to unpack the war file, replace the web.xml file with yours, repack the war file, and redeploy it. Alternatively, you can stop the application, save web.xml, redeploy the new war file, restore web.xml, and restart the application.

All out of the box Styles are upgraded automatically when you upgrade to ViewsFlash 7. Styles that have been customized will continue to work as before.

Step by step upgrade instructions

These notes are written for Tomcat 6 and 7, and they are easily adapted for any application servers have similar procedures.

Before you start

Read the Installation documentation to review the original deployment process. The Installation page in your current ViewsFlash's Help will give you the exact procedure that was used for its deployment.

In your browser go to the ViewsFlash application, logging in with a ViewsFlash administrator's credentials, and enter the Diagnose URL
ViewsFlash/servlet/vfadmin??Diagnose=1
as described in Installation, and save what it displays. At the end of the upgrade, you will want to compare it with the same command after the upgrade. The Diagnose URL is the definitive source for the actual servlet parameters that are being used in a deployed system.

Here is an example of some of the Diagnose output. Many lines have been removed for clarity:

    ViewsFlash 8.2 Build_8.2 / 802  02/26/2015 01:10 PM
...
    Initialization Parameters:
    Servlet initialization parameters:
    database=MySQL
    data=/etc/cogix/datatemp3
    dbstores=data|polls|results|styles|votes
    license=type=unlimited;bdb=y;bua=y;brs=y;bwp=y;vrs=5;who=Cogix;licensekey=(omitted)
    datasource=java:comp/env/cogix
    appsecurity=user
    apiattribute=com.cogix.vwf.api
    administrators=(not displayed)
    datareviewapi=true
    upload.maxsize=20000000
    propertiesfile=/etc/cogix/viewsflash.properties
...
    Checking data directory /etc/cogix/datatemp3
    - Directory exists.
    - Data directory successfully open for writing: /etc/cogix/datatemp3
...
    - Log file successfully written: /etc/cogix/datatemp3/viewsflash.log
...
    Web App Name: /ViewsFlash
...
    Checking database
    Driver  date 05/26/06 10:41  Binary data type MEDIUMBLOB JDBC Driver major version: 5 minor version: 1
    Database access class: com.cogix.vwf.MySQLNamedDataSource
    Normalized database class: com.cogix.vwf.MySQLDatabaseExtension@7c3d8cb
This information is necessary for the next steps.

To upgrade, there are several ways: in-place upgrade on the same application server. Follow the steps above and have the updated exploded ViewsFlashdirectory or the ViewsFlash.war file ready.

In place upgrade

Checking the new deployment

Upgrade to a new server

Find out what has changed