Mifos Setup — Challenges

Parag Patil
2 min readNov 29, 2020

To study Loan products, the best way is to try and understand the Loan Management System functionality especially the product configurator & some other aspects like Disbursement methods, repayment process, loan foreclosure etc. Though there are multiple proprietary software available in the market, it’s difficult to understand the functionality just through the product overview available on their websites. So I thought to explore the LMS system in the open source world, & guess what I came across Mifos which is 100% open-source application touching all aspects of Loan Management System. More details can be found here

As we move on, definitely we’ll touch base on the Mifos functional modules & its technical architecture. For now, let me elaborate on the challenges I faced during the Mifos setup. The setup can be done with the help of the installation documentation available, however, as far as open source systems are concerned, most of the times things are never straight forward & so was the case with me. In case you stumble on the similar issues that I faced, here is the way to address those.

  1. Before you start the setup, in the Tomcat lib directory, add the jaxb-api jar file. Download from this link
  2. Update the sql_mode value in my.ini file in MySQL setup directory as sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  3. Once the setup is done, you might come across this error message “Unable to find Unknown column ‘t9.previous_run_status” & to fix it fire this query to create column previous_run_status in scheduled_email_campaign table

ALTER TABLE `scheduled_email_campaign` ADD `previous_run_status` VARCHAR(10) NULL;

4. Similarly, if you have done the setup with latest version of MySQL, the another error message might occur

java.sql.SQLException: Value ‘0000–00–00’ can not be represented as java.sql.Timestamp

Change the date values from 0000–00–00 to the valid date, throughout the database to over come the error

This query can be used to identify all the columns in mifostenant-default database, that stores the date time values

SELECT col.table_schema as database_name,

col.table_name,

col.ordinal_position as column_id,

col.column_name,

col.data_type,

col.datetime_precision,

CONCAT(CONCAT(CONCAT(“Select “, col.column_name),” from “),col.table_name) AS _Query

from information_schema.columns col

join information_schema.tables tab on tab.table_schema = col.table_schema

and tab.table_name = col.table_name

and tab.table_type = ‘BASE TABLE’

where col.data_type in (‘date’, ‘time’, ‘datetime’, ‘year’, ‘timestamp’)

and col.table_schema not in (‘information_schema’, ‘sys’,

‘performance_schema’, ‘mysql’)

and col.table_schema = ‘mifostenant-default’

order by col.table_schema,

col.table_name,

col.ordinal_position;

That’s it for now. In case you have any other observations please do share in the comments section.

--

--