Skip to content

Instantly share code, notes, and snippets.

@amichaelgrant
amichaelgrant / gist:4952482
Created February 14, 2013 12:34
How to setup mifosx backend on tomcat7 on ubuntu 11.10 with mysql
How to setup mifosx backend on tomcat7 on ubuntu 11.10 with mysql
http://the-things-i-collect.blogspot.com/2013/02/how-to-setup-mifosx-on-tomcat7-on.html
@amichaelgrant
amichaelgrant / gist:4943473
Created February 13, 2013 09:56
Server.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@amichaelgrant
amichaelgrant / gist:4770504
Created February 12, 2013 15:09
After login
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
@amichaelgrant
amichaelgrant / gist:4761593
Created February 12, 2013 11:03
Error logs after replacing tomcat-jdbc jar with a newer version
Feb 12, 2013 10:56:47 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-28080"]
Feb 12, 2013 10:56:47 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-28443"]
Feb 12, 2013 10:56:47 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1121 ms
Feb 12, 2013 10:56:47 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 12, 2013 10:56:47 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.21
@amichaelgrant
amichaelgrant / gist:4753857
Created February 11, 2013 11:01
Server logs when deploying mifos on tomcat 7 with SSL and JNDI setup
grant >> tail -f mifos-platform.log
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:730) ~[spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486) ~[spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
... 46 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=tenantDataSourceJndi)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:949) ~[spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory
@amichaelgrant
amichaelgrant / gist:4708307
Created February 4, 2013 17:54
savings account approval error
authPath -->https://localhost:8443/mifosng-provider/api/v1/authentication?username=mifos&password=password
HTTP Status Line ->HTTP/1.1 200 OK
HTTP Line ->Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
HTTP Line ->Content-Type: application/json
HTTP Line ->Transfer-Encoding: chunked
HTTP Line ->Date: Mon, 04 Feb 2013 17:49:08 GMT
HTTP Line ->null
data authToX ==>{"username":"mifos","userId":1,"base64EncodedAuthenticationKey":"bWlmb3M6cGFzc3dvcmQ\u003d","authenticated":true,"permissions":["ALL_FUNCTIONS"]}
u ==> mifos
key ==> bWlmb3M6cGFzc3dvcmQ=
@amichaelgrant
amichaelgrant / gist:4706147
Created February 4, 2013 11:02
Mifosx deposit approval issued from web UI generates "No connection. Verify application is running" error. The logs show the following dump.
10:58:05.370 [http-bio-8443-exec-9] INFO o.m.i.s.f.TenantAwareBasicAuthenticationFilter - {"startTime":1359975485363,"totalTime":6,"method":"OPTIONS","url":"https://localhost:8443/mifosng-provider/api/v1/depositaccounts/1","parameters":{"associations":["all"]}}
Failed Query Report SQL=select da.id as id, da.external_id as externalId, da.client_id as clientId, da.product_id as productId, da.currency_code as currencyCode, da.currency_digits as currencyDigits, da.deposit_amount as depositAmount, da.status_enum as statusId, da.maturity_nominal_interest_rate as interestRate, da.tenure_months as termInMonths, da.projected_commencement_date as projectedCommencementDate, da.actual_commencement_date as actualCommencementDate, da.matures_on_date as maturedOn, da.projected_interest_accrued_on_maturity as projectedInterestAccrued, da.actual_interest_accrued as actualInterestAccrued, da.projected_total_maturity_amount as projectedMaturityAmount, da.actual_total_amount as actualMaturityAmount, da.interest_compounded_
{"dateFormat":"dd MMMM yyyy","locale":"en_GB","clientId":53,"productId":1,"interestType":1,"commencementDate":"29 jan 2013","lockinPeriodType":1,"lockinPeriod":12,"isLockinPeriodAllowed":false,"isPartialDepositAllowed":true,"minimumBalanceForWithdrawal":2.0,"interestCalculationMethod":1,"tenure":1,"tenureType":1,"savingInterestRate":0.1,"recurringInterestRate":0.5,"savingsDepositAmountPerPeriod":20.0,"digitsAfterDecimal":2,"currencyCode":"1","externalId":"ex-sav-id","frequency":1}
@amichaelgrant
amichaelgrant / gist:4610953
Created January 23, 2013 17:48
This happens when executing this commands from the UI Reports -> Client Reports ->Run
Response Text: {"developerMessage":"The request caused a data integrity issue to be fired by the database.","developerDocLink":"https://github.com/keithwoodlock/mifosx/wiki/HTTP-API-Error-codes","httpStatusCode":"403","defaultUserMessage":"Unknown column 'c.joining_date' in 'field list'","userMessageGlobalisationCode":"error.msg.sql.error","errors":[{"developerMessage":"Unknown column 'c.joining_date' in 'field list'","defaultUserMessage":"Unknown column 'c.joining_date' in 'field list'","userMessageGlobalisationCode":"error.msg.sql.error","parameterName":"Sql: select x.* from (select ounder.`name` as \"Office/Branch\", concat(c.lastname, if(c.firstname > \"\", concat(\", \", c.firstname), \"\")) as \"Name\", \r\nc.joining_date as \"Joining Date\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, '%')\r\nand ounder.hierarchy like concat('.', '%')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = 1\r\nand c.is_deleted=0\r\norder by ounder.hierarchy) x","value
createClient -->{"officeId":1,"firstname":"Michael","lastname":"Grant","externalId":"Not-so-much","dateFormat":"dd MMMM yyyy","joiningDate":"13 June 2013"}
HTTP URL -->https://localhost:8443/mifosng-provider/api/v1/clients
HTTP Status Line ->HTTP/1.1 400 Bad Request
HTTP Line ->Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
HTTP Line ->Content-Type: application/json
HTTP Line ->Transfer-Encoding: chunked
HTTP Line ->Date: Wed, 23 Jan 2013 17:07:00 GMT
HTTP Line ->null
{"developerMessage":"The request was invalid. This typically will happen due to validation errors which are provided.","developerDocLink":"https://github.com/keithwoodlock/mifosx/wiki/HTTP-API-Error-codes","httpStatusCode":"400","defaultUserMessage":"Validation errors exist.","userMessageGlobalisationCode":"validation.msg.validation.errors.exist","errors":[{"developerMessage":"The parameter joiningDate is not supported.","defaultUserMessage":"The parameter joiningDate is not supported.","userMessageGlobalisationCode":"error.m