Hi Neil,

 

I think this is what you have done, you have run a Mifos 1.3.1 database, as
that is the one that uses the database 220 version. What you need to do is

 

1.      Drop the schema in mifos 1.5
2.      install mifos 1.4 and upload the database. (this will in turn
upgrade the database). However it may fail to completely upgrade and you can
run the code below to upgrade 

UPDATE DATABASE_VERSION SET DATABASE_VERSION=221 WHERE DATABASE_VERSION=220;

UPDATE DATABASE_VERSION SET DATABASE_VERSION=222 WHERE DATABASE_VERSION=221;

UPDATE DATABASE_VERSION SET DATABASE_VERSION=223 WHERE DATABASE_VERSION=222;

UPDATE DATABASE_VERSION SET DATABASE_VERSION=224 WHERE DATABASE_VERSION=223;

UPDATE DATABASE_VERSION SET DATABASE_VERSION=225 WHERE DATABASE_VERSION=224;

3.      Back up that databse from mifos 1.4
4.      Install Mifos 1.5 and upload the back up database from 1.4

 

Hope that helps

 

Regards,

Maina

 

  _____  

From: Ryan Whitney [mailto:[email protected]] 
Sent: 01 July 2010 12:37
To: [email protected]
Subject: Re: [Mifos-users] "Failed to upgrade database." error

 

Neil,

Most likely what you have done is

1.      Run some database that was 1.5 before 
2.      Copy over it with an earlier version (maybe 1.4?) 
3.      Try to run Mifos 1.5 to upgrade the data


Basically, some left over tables are there which is causing the conflict in
the upgrade.  For a clean upgrade I would drop and then create the database
again, then import, then run Mifos again for the database upgrade.

Ryan


On 7/1/10 17:28, "Neil De la Cruz" <[email protected]> wrote:

Hello guys!

I just wonder what this error is all about and what could be the fix. I got
this error after I inserted the Mifos Server data that I got from
http://www.mifos.org/knowledge/resources/qa-testing/mifos_demo_backup.sql.zi
p/view. I'm using Mifos 1.5.x. 

Failed to upgrade database. Database Version = 220 Application Version =
240. 

More details:

java.sql.BatchUpdateException: Table 'imported_transactions_files' already
exists

Using Mifos database connection settings from file(s):
[/home/microbizone/Dev/apache-tomcat-6.0.26/webapps/mifos-webapp/WEB-INF/cla
sses/org/mifos/config/resources/mainDatabase.properties] Connection
URL=jdbc:mysql://localhost:3306/mifos?useUnicode=true&characterEncoding=UTF-
8. Username=mifos. Password=********

Stack trace:
java.lang.RuntimeException: error in upgrading to 221
 at
org.mifos.framework.persistence.DatabaseVersionPersistence.upgradeDatabase(D
atabaseVersionPersistence.java:494)
 at
org.mifos.framework.persistence.DatabaseVersionPersistence.upgradeDatabase(D
atabaseVersionPersistence.java:472)
 at
org.mifos.framework.ApplicationInitializer.init(ApplicationInitializer.java:
160)
 at
org.mifos.framework.ApplicationInitializer.contextInitialized(ApplicationIni
tializer.java:126)
 at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3972)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
 at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:519)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.sql.BatchUpdateException: Table
'imported_transactions_files' already exists
 at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:1067)
 at
com.mchange.v2.c3p0.impl.NewProxyStatement.executeBatch(NewProxyStatement.ja
va:743)
 at org.mifos.framework.persistence.SqlExecutor.execute(SqlExecutor.java:57)
 at org.mifos.framework.persistence.SqlUpgrade.runScript(SqlUpgrade.java:46)
 at org.mifos.framework.persistence.SqlUpgrade.upgrade(SqlUpgrade.java:53)
 at
org.mifos.framework.persistence.DatabaseVersionPersistence.upgradeDatabase(D
atabaseVersionPersistence.java:492)
 ... 27 more

Thanks a lot!

  _____  

----------------------------------------------------------------------------
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

  _____  

_______________________________________________
Mifos-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-users


-- 
Ryan Whitney 
Mifos Technical Program Manager
[email protected]  
Mifos - Technology that Empowers Microfinance (www.mifos.org) 
Our mission is to enable the poor, especially the poorest, to create a world
without poverty.  
<http://grameenfoundation.org/take-action/ingenuity-fund-challenge/>
P please consider the environment before printing this e-mail.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mifos-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-users

Reply via email to