Hi Graeme,

> I've been lurking for a month or so, running up a trial system for a
> potential new MFI (NOT in New Zealand :). 

Glad to know that you are interested in Mifos!
 
> The Problem
> -----------
> Connecting to Mifos after the upgrade returns the information below,
> rather than the logon screen. 
> Searching the server for the file "upgrade_to_169.sql" returns no
> results. 
> It looks to me as if either the application dependency on database
> version is incorrect or the database upgrade script is missing. 

When changes are made to the Mifos schema or default SQL data, there are
2 possible paths and upgrade can follow:

1) execute a sql script of the form "upgrade_to_xyz.sql" where "xyz" is
a database revision number like 169.
2) execute a Java upgrade method which is defined in a class file built
into Mifos.

In the case of database revision 169, the upgrade is implemented in
java, so you won't find any upgrade_to_169.sql file.  That's ok, since
the upgrade is performed in Java rather than SQL.  One thing to note
about this, is that attempting to apply SQL upgrade scripts manually
will not work correctly since you will miss any java upgrades.

You will note in the error message you gave the following:

>
org.mifos.application.master.persistence.Upgrade169.upgrade(Upgrade169.j
ava:
> 68)
>       at
>
org.mifos.framework.persistence.DatabaseVersionPersistence.upgradeDataba
se(D
> atabaseVersionPersistence.java:404)

This indicates that the Java Upgrade169 class was attempting to run when
you got your error.

The other thing to note is the error:

> Caused by: java.sql.SQLException: Duplicate entry '8' for key 1
>       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
>       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)

This alone doesn't tell you the exact problem, but from the Java code, I
can tell you the the issue is that upgrade 169 adds new entries into the
the database table COUNTRY.  In this case the entry being added is
colliding with another entry in that table.

Currently we don't support changes made to this table outside of the
Mifos software development process.  My guess is that an entry was added
to this table with a COUNTRY_ID of 8 which conflicts with the value that
upgrade 169 is attempting to insert.  If you can confirm that there is a
row in the COUNTRY table in the database you are attempting to upgrade
with a COUNTRY_ID of 8, then we can verify that this is the issue.

If this is the case, and you were interested in adding support to Mifos
for another country/language please let us know via the mailing list.  

We are currently in the process of doing a full implementation of
internationalization for Mifos initially to support Spanish and French
localizations and open the door to future additional language support.

Cheers,
--Van



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

Reply via email to