Activating AVA upgrades

From ADempiere ERP Wiki

Jump to: navigation, search

When running the ava_agent upgrade process, if you get the error "Error 1001 Last migration record not found in db" see http://www.nickelnetworks.com/erp/ava_help.php for a description of the problem and a link to the tracker where a fix is located.

I had a difficult time getting the fix to work. Here is how I managed.

I was using VMWare player on a Windows system. Intallation of the player and the initial AVA (353a) was successful. When I tried ./ava_agent upgrade I got the error. (Note: a more recent installation from sourceforge may avoid the problem)

The fix from Nickel Networks is in a file (fix-ID-2865701.sh) located at http://sourceforge.net/tracker/download.php?group_id=176962&atid=879332&file_id=344180&aid=2865701

From the ava command line, I used wget to download the file and save it to a local file.

wget -q "http://sourceforge.net/tracker/download.php?group_id=176962&atid=879332&file_id=344180&aid=2865701"

Change the permissions to allow execution:

chmod +x ./fix-ID-2865701.sh

The file is corrupted by a dos unix conversion problem so use dos2unix to fix it as follows:

dos2unix ./fix-ID-2865701.sh

Change directories to /root/.adempiere and rename the pg_migraton_rev file to pg_migration_rev. There was a spelling mistake in the name.

The script will now run but will not be successful. The fix requires a change to the script code. The script tries to download a file from a location stored in the /root/.adempiere/download_from file. This file contained the wrong location and, in any case, didn't get picked up by the script. To get around the error, edit the file and change line 112 to

wget -q http://sourceforge.net/projects/adempiere/files/AVABuild/$pg_migration_name/download?use_mirror=autoselect

To do this, I used the ed editor as follows:

[root@adempierehost ~]# ed fix-ID-2865701.sh
8821
112
wget -q $download_from/$pg_migration_name/download?use_mirror=autoselect
c
wget -q http://sourceforge.net/projects/adempiere/files/AVABuild/$pg_migration_name/download?use_mirror=autoselect
.
w
q
[root@adempierehost ~]# 

Is is now possible to complete the upgrade by executing ava_agent upgrade.

Personal tools