http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..0049fea
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,230 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+******************************************
+
+For API & System Architecture Documentation Apache Fineract includes 
Modernizr, HTML5 Boilerplate, jQuery, 
+normalize, bootstrap, halfings regular font, respondmin, jszip, toc, HTML5 
Shiv, filesaver javascript packages 
+with MIT copyright notice and license terms and it includes uglify javascript 
package with both MIT and BSD 
+copyright notice and license terms
+
+Modernizr license is included in licenses/modernizr.txt
+HTML5 Boilerplate license is included in licenses/html5_boilerplate.txt
+jQuery license is included in licenses/jQuery.txt
+normalize license is included in licenses/normalize.txt
+bootstrap license is included in licenses/bootstrap.txt
+halfings regular font license is included in licenses/bootstrap.txt
+respondmin license is included in licenses/respond.txt
+jszip license is included in licenses/jszip.txt
+toc license is included in licenses/toc.txt
+HTML5 Shiv license is included in licenses/html5shiv.txt
+filesaver license is included in licenses/filesaver.txt
+uglify MIT license is included in licenses/uglify_MIT.txt
+uglify BSD license is included in licenses/uglify_BSD.txt
+
+Apache Fineract uses Hibernate Entity Manager, MySQLDialect, 
annotations(LazyCollection, LazyCollectionOption) 
+with LGPL copyright notice and license terms at runtime and it doesn't include 
any source or libraries.
+
+Hibernate license is included in licenses/hibernate_lgpl.txt
+
+******************************************

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
deleted file mode 100644
index f26dea3..0000000
--- a/NOTICE
+++ /dev/null
@@ -1,122 +0,0 @@
-Apache Fineract
-Copyright 2008-2014 The Apache Software Foundation
-
-This product includes software developed by The Apache Software
-Foundation (http://www.apache.org/).
-
-AntLR Parser Generator (http://www.antlr.org/) antlr:antlr:jar:2.7.7
-License: BSD License (http://www.antlr.org/license.html)
-
-AOP alliance (http://aopalliance.sourceforge.net) 
aopalliance:aopalliance:jar:1.0
-License: Public Domain
-
-ASM (http://asm.objectweb.org/asm/asm) asm:asm:jar:3.1:compile
-License: BSD (http://asm.ow2.org/license.html)
-
-Backport of JSR 166 (http://backport-jsr166.sourceforge.net/) 
backport-util-concurrent:backport-util-concurrent:3.1
-License: Public Domain
-
-Bouncy Castle CMS and S/MIME (http://www.bouncycastle.org/java.html) 
org.bouncycastle:bcmail-jdk14:jar:1.38
-License: Bouncy Castle Licence (http://www.bouncycastle.org/licence.html)
-
-Bouncy Castle OpenPGP (http://www.bouncycastle.org/java.html) 
org.bouncycastle:bcprov-jdk14:jar:1.38
-License: Bouncy Castle Licence (http://www.bouncycastle.org/licence.html)
-
-Bouncy Castle Provider (http://www.bouncycastle.org/java.html) 
org.bouncycastle:bctsp-jdk14-:jar:1.38
-License: Bouncy Castle Licence (http://www.bouncycastle.org/licence.html)
-
-c3p0:JDBC DataSources/Resource Pools (http://www.mchange.com/projects/c3p0/) 
c3p0:c3p0:jar:0.9.1.1
-License: Eclipse Public License v 1.0 
(http://www.eclipse.org/legal/epl-v10.html)
-
-Logback Classic Module (http://logback.qos.ch) 
ch.qos.logback:logback-classic:jar:1.1.2
-License: Eclipse Public License v 1.0 
(http://www.eclipse.org/legal/epl-v10.html)
-
-Logback Core Module (http://logback.qos.ch) 
ch.qos.logback:ch.qos.logback:logback-core:jar:1.1.2
-License: Eclipse Public License v 1.0 
(http://www.eclipse.org/legal/epl-v10.html)
-
-Annotations for Software Defect Detection in 
Java(https://code.google.com/p/jsr-305/) 
com.google.code.findbugs:jsr305:jar:3.0.0
-License: BSD 3-Clause License (https://opensource.org/licenses/BSD-3-Clause)
-
-iText, a Free Java-PDF library (rtf package) (http://www.lowagie.com/iText) 
com.lowagie:itext-rtf:jar:2.1.7
-License: Mozilla Public License Version 1.1 
(https://www.mozilla.org/en-US/MPL/1.1/)
-
-iText, a Free Java-PDF library (http://www.lowagie.com/iText/) 
com.lowagie:itext:jar:2.1.7
-License: Mozilla Public License Version 1.1 
(https://www.mozilla.org/en-US/MPL/1.1/)
-
-Jersey Core (https://jersey.java.net/) com.sun.jersey:jersey-core:jar:1.17
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-Jersey Json (https://jersey.java.net/) com.sun.jersey:jersey-json:jar:1.17 
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-Jersey Server (https://jersey.java.net/) com.sun.jersey:jersey-server:jar:1.17 
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-Jersey Servlet (https://jersey.java.net/) 
com.sun.jersey:jersey-servlet:jar:1.17
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-Jersey Multipart (http://maven.apache.org/) 
com.sun.jersey.contribs:jersey-multipart:jar:1.17
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-Jersey Spring (http://maven.apache.org/) 
com.sun.jersey.contribs:jersey-spring:jar:1.17
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-JAXB (JSR 222) (http://jaxb.java.net/) com.sun.xml.bind:jaxb-impl:jar:2.2.3-1
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-dom4j (http://dom4j.org) dom4j:dom4j:jar:1.6.1
-License: BSD style license (http://dom4j.sourceforge.net/license.html)
-
-JavaBeans(TM) Activation Framework 
(http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp) 
javax.activation:activation:jar:1.1.1
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE 
(CDDL)v1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-JavaMail API (http://mvnrepository.com/artifact/javax.mail/mail) 
javax.mail:mail:jar:1.5.0-b01
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE 
(CDDL)v1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-JSR311 API (https://jsr311.java.net/) javax.ws.rs:jsr311-api:jar:1.1.1
-License: Common Development and Distribution License 
(CDDL)v1.0(http://www.opensource.org/licenses/cddl1.php)
-
-JAXB API bundle for GlassFish V3 (https://jaxb.java.net/) 
javax.xml.bind:jaxb-api:jar:2.2.2 
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE 
(CDDL)v1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-AspectJ Runtime (http://www.aspectj.org) org.aspectj:aspectjrt:jar:1.8.2
-License: Eclipse Public License v1.0 
(http://www.eclipse.org/legal/epl-v10.html)
-
-AspectJ Weaver (http://www.aspectj.org) org.aspectj:aspectjweaver:jar:1.8.2
-License: Eclipse Public License v1.0 
(http://www.eclipse.org/legal/epl-v10.html)
-
-Drizzle JDBC Connector (https://github.com/krummas/DrizzleJDBC) 
org.drizzle.jdbc:drizzle-jdbc:jar:1.3
-License: Simplified BSD (http://www.opensource.org/licenses/bsd-license.php)
-
-Hibernate JPA Support (http://hibernate.org) 
org.hibernate:hibernate-entitymanager:jar:4.3.6.Final
-License: GNU Lesser General Public License v2.1 
(http://www.gnu.org/licenses/lgpl-2.1.html)
-
-Core Hibernate O/RM functionality (http://hibernate.org) 
org.hibernate:hibernate-core:jar:4.3.6.Final
-License: GNU Lesser General Public License v2.1 
(http://www.gnu.org/licenses/lgpl-2.1.html)
-
-Hibernate Commons Annotations (http://hibernate.org) 
org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final
-License: GNU Lesser General Public License v2.1 
(http://www.gnu.org/licenses/lgpl-2.1.html)
-
-Java Persistence API Version 2.1 (http://hibernate.org) 
org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final
-License: Eclipse Public License (EPL) 
v1.0(http://www.eclipse.org/legal/epl-v10.html)
-
-Java Transaction API 
(http://mvnrepository.com/artifact/org.jboss.spec.javax.transaction/jboss-transaction-api_1.2_spec)
 org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE 
(CDDL)v1.0(http://repository.jboss.org/licenses/cddl.txt)
-
-MIME streaming extension (http://java.net/projects/mimepull) 
org.jvnet:mimepull:jar:1.6
-License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)v 
1.1(https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-
-iCal4j (http://ical4j.github.io/) org.mnode.ical4j:ical4j:jar:1.0.4
-License: BSD License (http://build.mnode.org/projects/ical4j/license.html)
-
-JCL 1.1.1 implemented over SLF4J (http://www.slf4j.org) 
org.slf4j:jcl-over-slf4j:jar:1.7.7
-License: MIT License (http://www.opensource.org/licenses/mit-license.php)
-
-JUL to SLF4J bridge (http://www.slf4j.org) org.slf4j:jul-to-slf4j:jar:1.7.7
-License: MIT License (http://www.opensource.org/licenses/mit-license.php)
-
-Log4j Implemented Over SLF4J (http://www.slf4j.org) 
org.slf4j:log4j-over-slf4j:jar:1.7.7
-License: MIT License (http://www.opensource.org/licenses/mit-license.php)
-
-SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.7.7
-License: MIT License (http://www.opensource.org/licenses/mit-license.php)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/NOTICE.txt
----------------------------------------------------------------------
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..ea3096b
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,9 @@
+Apache Fineract
+Copyright 2008-2016 The Apache Software Foundation
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).
+
+This software uses Hibernate Entity Manager, MySQLDialect, 
annotations(LazyCollection, LazyCollectionOption) 
+at run time and it doesn't bundle any source code or library which is 
developed by hibernate-orm project
+(http://hibernate.org, https://github.com/hibernate/hibernate-orm)

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
 
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
index b9fd152..fb20cb9 100644
--- 
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
+++ 
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
@@ -30,8 +30,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 
-import net.sf.ehcache.transaction.xa.EhcacheXAException;
-
 import 
org.apache.fineract.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
 import org.apache.fineract.integrationtests.common.ClientHelper;
 import org.apache.fineract.integrationtests.common.CommonConstants;
@@ -42,9 +40,7 @@ import 
org.apache.fineract.integrationtests.common.accounting.FinancialActivityA
 import org.apache.fineract.integrationtests.common.accounting.JournalEntry;
 import 
org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
 import 
org.apache.fineract.integrationtests.common.accounting.Account.AccountType;
-import 
org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountHelper;
 import 
org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositAccountStatusChecker;
-import 
org.apache.fineract.integrationtests.common.fixeddeposit.FixedDepositProductHelper;
 import 
org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositAccountHelper;
 import 
org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositAccountStatusChecker;
 import 
org.apache.fineract.integrationtests.common.recurringdeposit.RecurringDepositProductHelper;
@@ -64,7 +60,7 @@ import com.jayway.restassured.http.ContentType;
 import com.jayway.restassured.specification.RequestSpecification;
 import com.jayway.restassured.specification.ResponseSpecification;
 
-@SuppressWarnings({ "unused", "rawtypes", "unchecked", "static-access" })
+@SuppressWarnings({"unused", "rawtypes", "unchecked", "static-access" })
 public class RecurringDepositTest {
 
     private ResponseSpecification responseSpec;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/StaffImageApiTest.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/StaffImageApiTest.java
 
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/StaffImageApiTest.java
index b6f4181..4b285b8 100644
--- 
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/StaffImageApiTest.java
+++ 
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/StaffImageApiTest.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.integrationtests;
 
-import com.sun.jersey.core.util.Base64;
-
 import org.apache.fineract.integrationtests.common.ImageHelper;
 import org.apache.fineract.integrationtests.common.Utils;
 import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
@@ -35,8 +33,6 @@ import com.jayway.restassured.http.ContentType;
 import com.jayway.restassured.specification.RequestSpecification;
 import com.jayway.restassured.specification.ResponseSpecification;
 
-import java.io.IOException;
-
 public class StaffImageApiTest {
 
     private RequestSpecification requestSpec;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java
 
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java
index bf44576..d0b1942 100644
--- 
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java
+++ 
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/StandingInstructionsHelper.java
@@ -23,13 +23,11 @@ import java.util.List;
 
 import org.apache.fineract.integrationtests.common.Utils;
 
-import ch.qos.logback.classic.pattern.Util;
-
 import com.google.gson.Gson;
 import com.jayway.restassured.specification.RequestSpecification;
 import com.jayway.restassured.specification.ResponseSpecification;
 
-@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
+@SuppressWarnings({"unused", "rawtypes", "unchecked" })
 public class StandingInstructionsHelper {
 
     private static final String STANDING_INSTRUCTIONS_URL = 
"/fineract-provider/api/v1/standinginstructions";

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java 
b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java
index 55f9391..9f86666 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract;
 
 import 
org.apache.fineract.infrastructure.core.boot.AbstractApplicationConfiguration;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/ServerWithMariaDB4jApplication.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/ServerWithMariaDB4jApplication.java
 
b/fineract-provider/src/main/java/org/apache/fineract/ServerWithMariaDB4jApplication.java
index ecfedec..0ed31fd 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/ServerWithMariaDB4jApplication.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/ServerWithMariaDB4jApplication.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract;
 
 import java.awt.Desktop;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java
index 6d0596e..a6731d8 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.infrastructure.accountnumberformat.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import 
org.apache.fineract.infrastructure.accountnumberformat.service.AccountNumberFormatWritePlatformService;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "ACCOUNTNUMBERFORMAT", action = "CREATE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java
index dc47e28..8852952 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.infrastructure.accountnumberformat.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import 
org.apache.fineract.infrastructure.accountnumberformat.service.AccountNumberFormatWritePlatformService;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "ACCOUNTNUMBERFORMAT", action = "DELETE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java
index 975de3b..6fb394c 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.infrastructure.accountnumberformat.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import 
org.apache.fineract.infrastructure.accountnumberformat.service.AccountNumberFormatWritePlatformService;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "ACCOUNTNUMBERFORMAT", action = "UPDATE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java
index b1f4313..12147af 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java
@@ -21,13 +21,11 @@ package 
org.apache.fineract.infrastructure.accountnumberformat.service;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import javax.transaction.Transactional;
-
 import 
org.apache.fineract.infrastructure.accountnumberformat.data.AccountNumberFormatDataValidator;
 import 
org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat;
+import 
org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatEnumerations.AccountNumberPrefixType;
 import 
org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatRepositoryWrapper;
 import 
org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
-import 
org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatEnumerations.AccountNumberPrefixType;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder;
@@ -37,6 +35,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.DataIntegrityViolationException;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 public class AccountNumberFormatWritePlatformServiceJpaRepositoryImpl 
implements AccountNumberFormatWritePlatformService {

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java
index 0eeec99..7ac996b 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract.infrastructure.core.boot;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jDataSourceConfiguration.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jDataSourceConfiguration.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jDataSourceConfiguration.java
index 08971d2..ce32ac2 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jDataSourceConfiguration.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jDataSourceConfiguration.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract.infrastructure.core.boot.db;
 
 import org.springframework.context.annotation.Bean;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jSetupService.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jSetupService.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jSetupService.java
index b29579f..92ca4a5 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jSetupService.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/MariaDB4jSetupService.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract.infrastructure.core.boot.db;
 
 import javax.annotation.PostConstruct;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
index 13edd7b..8bdc638 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
@@ -57,9 +57,6 @@ import 
org.apache.fineract.infrastructure.dataqueries.exception.DatatableNotFoun
 import 
org.apache.fineract.infrastructure.dataqueries.exception.DatatableSystemErrorException;
 import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
 import org.apache.fineract.useradministration.domain.AppUser;
-import org.hibernate.exception.ConstraintViolationException;
-import org.hibernate.exception.GenericJDBCException;
-import org.hibernate.exception.SQLGrammarException;
 import org.joda.time.LocalDate;
 import org.joda.time.LocalDateTime;
 import org.slf4j.Logger;
@@ -87,8 +84,7 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
     private final static String CODE_VALUES_TABLE = "m_code_value";
 
     private final static Logger logger = 
LoggerFactory.getLogger(ReadWriteNonCoreDataServiceImpl.class);
-    private final static HashMap<String, String> apiTypeToMySQL = new 
HashMap<String, String>() {
-
+       private final static HashMap<String, String> apiTypeToMySQL = new 
HashMap<String, String>() {
         {
             put("string", "VARCHAR");
             put("number", "INT");
@@ -260,22 +256,13 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
             }
 
         }
-        /***
-         * Strangely, a Hibernate contraint violation exception is thrown
-         ****/
-        catch (final ConstraintViolationException cve) {
-            final Throwable realCause = cve.getCause();
-            // even if duplicate is only due to permission duplicate, okay to
-            // show duplicate datatable error msg
-            if (realCause.getMessage()
-                    .contains("Duplicate entry")) { throw new 
PlatformDataIntegrityException("error.msg.datatable.registered",
-                            "Datatable `" + dataTableName + "` is already 
registered against an application table.", "dataTableName",
-                            dataTableName); }
-        } catch (final DataIntegrityViolationException dve) {
+         catch (final DataIntegrityViolationException dve) {
+               final Throwable cause = dve.getCause() ;
             final Throwable realCause = dve.getMostSpecificCause();
             // even if duplicate is only due to permission duplicate, okay to
             // show duplicate datatable error msg
             if (realCause.getMessage()
+                    .contains("Duplicate entry") || cause.getMessage()
                     .contains("Duplicate entry")) { throw new 
PlatformDataIntegrityException("error.msg.datatable.registered",
                             "Datatable `" + dataTableName + "` is already 
registered against an application table.", "dataTableName",
                             dataTableName); }
@@ -373,23 +360,11 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
 
             return commandProcessingResult; //
 
-        } catch (final ConstraintViolationException dve) {
-            // NOTE: jdbctemplate throws a
-            // org.hibernate.exception.ConstraintViolationException even though
-            // it should be a DataAccessException?
-            final Throwable realCause = dve.getCause();
-            if (realCause.getMessage()
-                    .contains("Duplicate entry")) { throw new 
PlatformDataIntegrityException(
-                            "error.msg.datatable.entry.duplicate", "An entry 
already exists for datatable `" + dataTableName
-                                    + "` and application table with identifier 
`" + appTableId + "`.",
-                            "dataTableName", dataTableName, appTableId); }
-
-            logAsErrorUnexpectedDataIntegrityException(dve);
-            throw new 
PlatformDataIntegrityException("error.msg.unknown.data.integrity.issue",
-                    "Unknown data integrity issue with resource.");
         } catch (final DataAccessException dve) {
+                final Throwable cause = dve.getCause();
             final Throwable realCause = dve.getMostSpecificCause();
             if (realCause.getMessage()
+                    .contains("Duplicate entry") || cause.getMessage()
                     .contains("Duplicate entry")) { throw new 
PlatformDataIntegrityException(
                             "error.msg.datatable.entry.duplicate", "An entry 
already exists for datatable `" + dataTableName
                                     + "` and application table with identifier 
`" + appTableId + "`.",
@@ -419,23 +394,11 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
 
             return commandProcessingResult; //
 
-        } catch (final ConstraintViolationException dve) {
-            // NOTE: jdbctemplate throws a
-            // org.hibernate.exception.ConstraintViolationException even though
-            // it should be a DataAccessException?
-            final Throwable realCause = dve.getCause();
-            if (realCause.getMessage()
-                    .contains("Duplicate entry")) { throw new 
PlatformDataIntegrityException(
-                            "error.msg.datatable.entry.duplicate", "An entry 
already exists for datatable `" + dataTableName
-                                    + "` and application table with identifier 
`" + appTableId + "`.",
-                            "dataTableName", dataTableName, appTableId); }
-
-            logAsErrorUnexpectedDataIntegrityException(dve);
-            throw new 
PlatformDataIntegrityException("error.msg.unknown.data.integrity.issue",
-                    "Unknown data integrity issue with resource.");
         } catch (final DataAccessException dve) {
+               final Throwable cause = dve.getCause();
             final Throwable realCause = dve.getMostSpecificCause();
             if (realCause.getMessage()
+                    .contains("Duplicate entry") || cause.getMessage()
                     .contains("Duplicate entry")) { throw new 
PlatformDataIntegrityException(
                             "error.msg.datatable.entry.duplicate", "An entry 
already exists for datatable `" + dataTableName
                                     + "` and application table with identifier 
`" + appTableId + "`.",
@@ -594,7 +557,7 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
 
             registerDatatable(datatableName, apptableName);
             registerColumnCodeMapping(codeMappings);
-        } catch (final SQLGrammarException e) {
+        } catch (final DataIntegrityViolationException  e) {
             final Throwable realCause = e.getCause();
             final List<ApiParameterError> dataValidationErrors = new 
ArrayList<>();
             final DataValidatorBuilder baseDataValidator = new 
DataValidatorBuilder(dataValidationErrors).resource("datatable");
@@ -949,7 +912,7 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
                     this.jdbcTemplate.execute(sqlBuilder.toString());
                     deleteColumnCodeMapping(removeMappings);
                     registerColumnCodeMapping(codeMappings);
-                } catch (final GenericJDBCException e) {
+                } catch (final DataIntegrityViolationException  e) {
                     if (e.getMessage().contains("Error on rename")) { throw 
new PlatformServiceUnavailableException(
                             "error.msg.datatable.column.update.not.allowed", 
"One of the column name modification not allowed"); }
                 } catch (final Exception e) {
@@ -965,7 +928,7 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
                                     "One of the data table columns contains 
null values"); }
                 }
             }
-        } catch (final SQLGrammarException e) {
+        } catch (final DataIntegrityViolationException  e) {
             final Throwable realCause = e.getCause();
             final List<ApiParameterError> dataValidationErrors = new 
ArrayList<>();
             final DataValidatorBuilder baseDataValidator = new 
DataValidatorBuilder(dataValidationErrors).resource("datatable");
@@ -1004,7 +967,7 @@ public class ReadWriteNonCoreDataServiceImpl implements 
ReadWriteNonCoreDataServ
             final String sql = "DROP TABLE `" + datatableName + "`";
             sqlArray[0] = sql;
             this.jdbcTemplate.batchUpdate(sqlArray);
-        } catch (final SQLGrammarException e) {
+        } catch (final DataIntegrityViolationException  e) {
             final Throwable realCause = e.getCause();
             final List<ApiParameterError> dataValidationErrors = new 
ArrayList<>();
             final DataValidatorBuilder baseDataValidator = new 
DataValidatorBuilder(dataValidationErrors).resource("datatable");

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java
index 28b3121..2ab4143 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.infrastructure.entityaccess.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import 
org.apache.fineract.infrastructure.entityaccess.service.FineractEntityAccessWriteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "ENTITYMAPPING", action = "CREATE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java
index 958c1e4..4fdcf0d 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.infrastructure.entityaccess.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import 
org.apache.fineract.infrastructure.entityaccess.service.FineractEntityAccessWriteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "ENTITYMAPPING", action = "DELETE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java
index bc35640..5e04af5 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.infrastructure.entityaccess.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import 
org.apache.fineract.infrastructure.entityaccess.service.FineractEntityAccessWriteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "ENTITYMAPPING", action = "UPDATE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java
index fd36862..94ee29c 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java
@@ -21,6 +21,7 @@ package org.apache.fineract.portfolio.calendar.domain;
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.fineract.portfolio.client.domain.Client;
 import org.apache.fineract.portfolio.group.domain.Group;
 import org.apache.fineract.portfolio.loanaccount.domain.Loan;
 import org.apache.fineract.portfolio.savings.domain.SavingsAccount;
@@ -29,7 +30,6 @@ import 
org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
 
-import ch.qos.logback.core.net.server.Client;
 
 public interface CalendarInstanceRepository extends 
JpaRepository<CalendarInstance, Long>, 
JpaSpecificationExecutor<CalendarInstance> {
 

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/CreatePaymentTypeCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/CreatePaymentTypeCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/CreatePaymentTypeCommandHandler.java
index bac7f24..8c0b81e 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/CreatePaymentTypeCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/CreatePaymentTypeCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.portfolio.paymenttype.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import 
org.apache.fineract.portfolio.paymenttype.service.PaymentTypeWriteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "PAYMENTTYPE", action = "CREATE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/DeletePaymentTypeCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/DeletePaymentTypeCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/DeletePaymentTypeCommandHandler.java
index 50a21dc..9be10b2 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/DeletePaymentTypeCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/DeletePaymentTypeCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.portfolio.paymenttype.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import 
org.apache.fineract.portfolio.paymenttype.service.PaymentTypeWriteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "PAYMENTTYPE", action = "DELETE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/UpdatePaymentTypeCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/UpdatePaymentTypeCommandHandler.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/UpdatePaymentTypeCommandHandler.java
index 381155d..9b691ab 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/UpdatePaymentTypeCommandHandler.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/UpdatePaymentTypeCommandHandler.java
@@ -18,8 +18,6 @@
  */
 package org.apache.fineract.portfolio.paymenttype.handler;
 
-import javax.transaction.Transactional;
-
 import org.apache.fineract.commands.annotation.CommandType;
 import org.apache.fineract.commands.handler.NewCommandSourceHandler;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -27,6 +25,7 @@ import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import 
org.apache.fineract.portfolio.paymenttype.service.PaymentTypeWriteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 @CommandType(entity = "PAYMENTTYPE", action = "UPDATE")

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/AbstractSpringBootWithMariaDB4jIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/AbstractSpringBootWithMariaDB4jIntegrationTest.java
 
b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/AbstractSpringBootWithMariaDB4jIntegrationTest.java
index d538186..bc97b40 100644
--- 
a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/AbstractSpringBootWithMariaDB4jIntegrationTest.java
+++ 
b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/AbstractSpringBootWithMariaDB4jIntegrationTest.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract.infrastructure.core.boot.tests;
 
 import org.apache.fineract.ServerWithMariaDB4jApplication;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/EmbeddedTomcatWithSSLConfigurationTest.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/EmbeddedTomcatWithSSLConfigurationTest.java
 
b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/EmbeddedTomcatWithSSLConfigurationTest.java
index b1eea9e..2d72666 100644
--- 
a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/EmbeddedTomcatWithSSLConfigurationTest.java
+++ 
b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/EmbeddedTomcatWithSSLConfigurationTest.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract.infrastructure.core.boot.tests;
 
 import static org.junit.Assert.assertTrue;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/SpringBootServerLoginTest.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/SpringBootServerLoginTest.java
 
b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/SpringBootServerLoginTest.java
index dc70ffb..11a2e4c 100644
--- 
a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/SpringBootServerLoginTest.java
+++ 
b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/boot/tests/SpringBootServerLoginTest.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.fineract.infrastructure.core.boot.tests;
 
 import static org.hamcrest.Matchers.is;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/licenses/bootstrap.txt
----------------------------------------------------------------------
diff --git a/licenses/bootstrap.txt b/licenses/bootstrap.txt
new file mode 100644
index 0000000..7a30002
--- /dev/null
+++ b/licenses/bootstrap.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2011-2016 Twitter, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2317ff4a/licenses/filesaver.txt
----------------------------------------------------------------------
diff --git a/licenses/filesaver.txt b/licenses/filesaver.txt
new file mode 100644
index 0000000..1c38e10
--- /dev/null
+++ b/licenses/filesaver.txt
@@ -0,0 +1,17 @@
+Copyright � 2015 [Eli Grey][1].
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated 
+documentation files (the "Software"), to deal in the Software without 
restriction, including without limitation 
+the rights to use, copy, modify, merge, publish, distribute, sublicense, 
and/or sell copies of the Software, 
+and to permit persons to whom the Software is furnished to do so, subject to 
the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
copies or substantial portions 
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED 
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
NONINFRINGEMENT. 
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
DAMAGES OR OTHER LIABILITY, 
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
IN CONNECTION WITH THE SOFTWARE 
+OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+  [1]: http://eligrey.com

Reply via email to