Updating webapp in Tomcat (from WAR file)

Contents

Updating tinyPM in Tomcat

Updating on Linux systems using update script
Starting from v2.5.2 there is a script update.sh available in tinyPM ZIP archive that provides an easy way to update tinyPM (including it's MySQL database). Note that scripts is still experimental so make sure to backup your tinyPM configuration and data before running it for the first time. It's always possible to follow the update instructions below if the script does not work for you. But if you find any problems with update.sh then let us know.
Remember to backup your data!
Always remember to backup your database and configuration files before updating tinyPM installation!
See also:

1. Stop your Tomcat server.

We recommend not to use auto deployment features from Tomcat

2. Backup your database and backup .properties files (see tinyPM Backup).

3. Unzip tinyPM zip file to temporary directory (%TINYPM_TEMP_PATH%).

4. If the %TINYPM_TEMP_PATH%/sql/mysql contains update scripts for later versions of tinyPM, then run all scripts starting from your current version up to the target version on your tinyPM database (not all versions of tinyPM require database updates):

Starting from v2.5.2 you can check what scripts should be used to update your database by using the following command:
java -jar %CATALINA_HOME%/webapps/tinypm/WEB-INF/lib/tinypm.jar --scripts=<your_current_tinypm_version>
MySQL console - sample upgrade from v2.2.4 to v2.3
\u tinypmdb
\. %TINYPM_TEMP_PATH%/sql/mysql/update_from_2.2.4_to_2.2.5.sql
\. %TINYPM_TEMP_PATH%/sql/mysql/update_from_2.2.5_to_2.3.sql

5. Go to your tinyPM webapp directory and remove all its contents, so that the directory %CATALINA_HOME%/webapps/tinypm is empty.

6. Unzip new tinypm.war to your %CATALINA_HOME%/webapps/tinypm directory.

7. Copy the backuped *.properties files into:

%CATALINA_HOME%/webapps/tinypm/WEB-INF/classes/

If you didn't do a backup, you need to edit the hibernate.properties file and setup your database connection settings again.

Starting from tinyPM 2.0 all database configuration settings are placed in:
%CATALINA_HOME%/webapps/tinypm/WEB-INF/classes/hibernate.properties
instead of:
%CATALINA_HOME%/webapps/tinypm/META-INF/context.xml

8. Start your Tomcat server.

Congratulations! Your new tinyPM version is up and running!

Troubleshooting

By default tinyPM uses ERROR logging level to avoid flooding your log files. If you have problems with your tinyPM installation you can change logging level to a more verbose INFO level by editing Log4J settings in:

%CATALINA_HOME%/webapps/tinypm/WEB-INF/classes/log4j.properties
? If this documentation doesn't solve your problem or has left you with any questions, please don't hesitate to contact us at support@tinypm.com
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.