You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ra...@apache.org on 2016/02/08 09:13:24 UTC
incubator-fineract git commit: Connector changes from mysql to drizzle
Repository: incubator-fineract
Updated Branches:
refs/heads/develop 86ca06215 -> 2a45fe139
Connector changes from mysql to drizzle
Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/2a45fe13
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/2a45fe13
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/2a45fe13
Branch: refs/heads/develop
Commit: 2a45fe1390abc166a4b9e53c83051defdf40f551
Parents: 86ca062
Author: unknown <na...@confluxtechnologies.com>
Authored: Mon Feb 8 11:27:46 2016 +0530
Committer: unknown <na...@confluxtechnologies.com>
Committed: Mon Feb 8 11:27:46 2016 +0530
----------------------------------------------------------------------
fineract-provider/build.gradle | 22 +++++++-------
fineract-provider/dependencies.gradle | 5 ++--
fineract-provider/dev-dependencies.gradle | 5 ++--
...nalEntryRunningBalanceUpdateServiceImpl.java | 31 ++++++++++----------
.../core/boot/db/DataSourceProperties.java | 5 ++--
.../FineractPlatformTenantConnection.java | 2 +-
...ndonedConnectionCleanupShutdownListener.java | 12 ++++----
.../service/TenantDatabaseUpgradeService.java | 5 +++-
.../TomcatJdbcDataSourcePerTenantService.java | 2 +-
.../service/LoanArrearsAgingServiceImpl.java | 5 ++--
.../src/main/resources/application.properties | 19 ++++++++++++
.../core_db/V48__adding-S3-Support.sql | 7 +++--
.../src/test/resources/META-INF/context.xml | 2 +-
13 files changed, 75 insertions(+), 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/build.gradle
----------------------------------------------------------------------
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 35bf2da..d104a1f 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -201,7 +201,7 @@ configurations {
driver
}
dependencies {
- driver 'mysql:mysql-connector-java:5.1.16'
+ driver 'org.drizzle.jdbc:drizzle-jdbc:1.3'
}
URLClassLoader loader = GroovyObject.class.classLoader
@@ -211,17 +211,17 @@ configurations.driver.each {File file ->
task createDB<<{
description= "Creates the Database. Needs database name to be passed (like: -PdbName=someDBname)"
- sql = Sql.newInstance( 'jdbc:mysql://localhost:3306/', mysqlUser, mysqlPassword, 'com.mysql.jdbc.Driver' )
+ sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute( 'create database '+"`$dbName`" )
}
task dropDB<<{
description= "Drops the specified database. The database name has to be passed (like: -PdbName=someDBname)"
- sql = Sql.newInstance( 'jdbc:mysql://localhost:3306/', mysqlUser, mysqlPassword, 'com.mysql.jdbc.Driver' )
+ sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute( 'DROP DATABASE '+"`$dbName`")
}
task setBlankPassword<<{
- sql = Sql.newInstance( 'jdbc:mysql://localhost:3306/', mysqlUser, mysqlPassword, 'com.mysql.jdbc.Driver' )
+ sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute('USE `mifosplatform-tenants`')
sql.execute('UPDATE mifosplatform-tenants.tenants SET schema_server = \'localhost\', schema_server_port = \'3306\', schema_username = \'mifos\', schema_password = \'mysql\' WHERE id=1;')
}
@@ -235,13 +235,13 @@ buildscript {
dependencies {
classpath "org.flywaydb:flyway-gradle-plugin:3.0" // version upgraded during Spring Boot & MariaDB4j work, as prev. used v0.2 didn't work well after *.sql moved from fineract-db to fineract-provider/src/main/resources (new version also has clearer errors, e.g. in case of missing DB)
- classpath 'mysql:mysql-connector-java:5.1.22'
+ classpath 'org.drizzle.jdbc:drizzle-jdbc:1.3'
}
}
flyway {
- url = "jdbc:mysql://localhost:3306/mifostenant-default"
+ url = "jdbc:mysql:thin://localhost:3306/mifostenant-default"
user = mysqlUser
password = mysqlPassword
}
@@ -255,7 +255,7 @@ task migrateTenantDB<<{
tenantDbName = rootProject.getProperty("dbName")
}
- flyway.url= "jdbc:mysql://localhost:3306/$tenantDbName"
+ flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantDbName"
flyway.locations= [filePath]
/**We use ${ as the prefix for strecthy reporting, do not want them to be interpreted by Flyway**/
flyway.placeholderPrefix = "\$\${"
@@ -271,7 +271,7 @@ task showTenantDBInfo<<{
tenantDbName = rootProject.getProperty("dbName")
}
- flyway.url= "jdbc:mysql://localhost:3306/$tenantDbName"
+ flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantDbName"
flyway.locations= [filePath]
flywayInfo.execute()
}
@@ -286,7 +286,7 @@ task migrateTenantListDB<<{
tenantsDbName = rootProject.getProperty("dbName")
}
- flyway.url= "jdbc:mysql://localhost:3306/$tenantsDbName"
+ flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantsDbName"
flyway.locations= [filePath]
flywayMigrate.execute()
@@ -301,7 +301,7 @@ task showTenantListDBInfo<<{
tenantsDbName = rootProject.getProperty("dbName")
}
- flyway.url= "jdbc:mysql://localhost:3306/$tenantsDbName"
+ flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantsDbName"
flyway.locations= [filePath]
flywayInfo.execute()
}
@@ -315,7 +315,7 @@ task repairTenantDB<<{
tenantsDbName = rootProject.getProperty("dbName")
}
- flyway.url= "jdbc:mysql://localhost:3306/$tenantsDbName"
+ flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantsDbName"
flyway.locations= [filePath]
flywayRepair.execute()
}
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/dependencies.gradle
----------------------------------------------------------------------
diff --git a/fineract-provider/dependencies.gradle b/fineract-provider/dependencies.gradle
index e40a330..d8dabd5 100644
--- a/fineract-provider/dependencies.gradle
+++ b/fineract-provider/dependencies.gradle
@@ -41,13 +41,14 @@ dependencies {
[group: 'com.google.guava', name: 'guava', version: '15.0'],
[group: 'joda-time', name: 'joda-time', version: '2.4'],
- [group: 'net.sourceforge.javacsv', name: 'javacsv', version: '2.0'],
+ //[group: 'net.sourceforge.javacsv', name: 'javacsv', version: '2.0'],
[group: 'org.apache.commons', name: 'commons-email', version: '1.3.3'],
[group: 'org.apache.commons', name: 'commons-lang3', version: '3.3.2'],
// no slf4j & logback here (anymore), as spring-boot-starter-logging already brings this now, better assembled (log4j-over-slf4j was originally forgotten here)
- [group: 'mysql', name: 'mysql-connector-java', version: '5.1.27'],
+ //[group: 'mysql', name: 'mysql-connector-java', version: '5.1.27'],
+ [group: 'org.drizzle.jdbc', name: 'drizzle-jdbc', version: '1.3'],
// [group: 'org.apache.tomcat', name: 'tomcat-jdbc', version: tomcatVersion],
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/dev-dependencies.gradle
----------------------------------------------------------------------
diff --git a/fineract-provider/dev-dependencies.gradle b/fineract-provider/dev-dependencies.gradle
index 83039f7..89ffcf1 100644
--- a/fineract-provider/dev-dependencies.gradle
+++ b/fineract-provider/dev-dependencies.gradle
@@ -40,13 +40,14 @@ dependencies {
[group: 'com.google.guava', name: 'guava', version: '15.0'],
[group: 'joda-time', name: 'joda-time', version: '2.4'],
- [group: 'net.sourceforge.javacsv', name: 'javacsv', version: '2.0'],
+ //[group: 'net.sourceforge.javacsv', name: 'javacsv', version: '2.0'],
[group: 'org.apache.commons', name: 'commons-email', version: '1.3.3'],
[group: 'org.apache.commons', name: 'commons-lang3', version: '3.3.2'],
// no slf4j & logback here (anymore), as spring-boot-starter-logging already brings this now, better assembled (log4j-over-slf4j was originally forgotten here)
- [group: 'mysql', name: 'mysql-connector-java', version: '5.1.27'],
+ //[group: 'mysql', name: 'mysql-connector-java', version: '5.1.27'],
+ [group: 'org.drizzle.jdbc', name: 'drizzle-jdbc', version: '1.3'],
[group: 'org.apache.tomcat', name: 'tomcat-jdbc', version: tomcatVersion],
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java
index 268b2e0..4ab8e11 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java
@@ -21,6 +21,7 @@ package org.apache.fineract.accounting.journalentry.service;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.SQLException;
+import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -141,7 +142,7 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
List<Map<String, Object>> list = jdbcTemplate.queryForList(organizationRunningBalanceSql, entityDate, entityDate);
for (Map<String, Object> entries : list) {
- Long accountId = (Long) entries.get("accountId");
+ Long accountId = Long.parseLong(entries.get("accountId").toString()); //Drizzle is returning Big Integer where as MySQL returns Long.
if (!runningBalanceMap.containsKey(accountId)) {
runningBalanceMap.put(accountId, (BigDecimal) entries.get("runningBalance"));
}
@@ -149,8 +150,8 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
List<Map<String, Object>> officesRunningBalanceList = jdbcTemplate.queryForList(officesRunningBalanceSql, entityDate, entityDate);
for (Map<String, Object> entries : officesRunningBalanceList) {
- Long accountId = (Long) entries.get("accountId");
- Long officeId = (Long) entries.get("officeId");
+ Long accountId = Long.parseLong(entries.get("accountId").toString());
+ Long officeId = Long.parseLong(entries.get("officeId").toString());
Map<Long, BigDecimal> runningBalance = null;
if (officesRunningBalance.containsKey(officeId)) {
runningBalance = officesRunningBalance.get(officeId);
@@ -168,10 +169,10 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
if (entryDatas.size() > 0) {
// run a batch update of 1000 SQL statements at a time
final Integer batchUpdateSize = 1000;
- final Integer batchUpdateSizeMinusOne = batchUpdateSize - 1;
- String[] updateSql = new String[batchUpdateSize];
- int i = 0;
- for (JournalEntryData entryData : entryDatas) {
+ ArrayList<String> updateSql = new ArrayList<>();
+ int batchIndex = 0;
+ for (int index = 0 ; index < entryDatas.size() ; index++) {
+ JournalEntryData entryData = entryDatas.get(index) ;
Map<Long, BigDecimal> officeRunningBalanceMap = null;
if (officesRunningBalance.containsKey(entryData.getOfficeId())) {
officeRunningBalanceMap = officesRunningBalance.get(entryData.getOfficeId());
@@ -183,18 +184,18 @@ public class JournalEntryRunningBalanceUpdateServiceImpl implements JournalEntry
BigDecimal runningBalance = calculateRunningBalance(entryData, runningBalanceMap);
String sql = "UPDATE acc_gl_journal_entry je SET je.is_running_balance_calculated=1, je.organization_running_balance="
+ runningBalance + ",je.office_running_balance=" + officeRunningBalance + " WHERE je.id=" + entryData.getId();
- updateSql[i++] = sql;
-
- if (i == batchUpdateSizeMinusOne) {
+ updateSql.add(sql) ;
+ batchIndex++ ;
+ if (batchIndex == batchUpdateSize || index == entryDatas.size()-1) {
// run a batch update of the 1000 update SQL statements
- this.jdbcTemplate.batchUpdate(updateSql);
-
+ String[] batch = new String[updateSql.size()] ;
+ updateSql.toArray(batch) ;
+ this.jdbcTemplate.batchUpdate(batch);
// reset counter and string array
- i = 0;
- updateSql = new String[batchUpdateSize];
+ batchIndex = 0;
+ updateSql.clear();
}
}
- this.jdbcTemplate.batchUpdate(updateSql);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/DataSourceProperties.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/DataSourceProperties.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/DataSourceProperties.java
index 38fe6e8..33800bd 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/DataSourceProperties.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/DataSourceProperties.java
@@ -21,6 +21,7 @@ package org.apache.fineract.infrastructure.core.boot.db;
import javax.validation.constraints.NotNull;
import org.apache.tomcat.jdbc.pool.PoolProperties;
+import org.drizzle.jdbc.DrizzleDriver;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
@@ -60,7 +61,7 @@ public class DataSourceProperties extends PoolProperties {
@Value("${" + PROTOCOL + ":jdbc}")
private volatile @NotNull String jdbcProtocol;
- @Value("${" + SUBPROTOCOL + ":mysql}")
+ @Value("${" + SUBPROTOCOL + ":mysql:thin}")
private volatile @NotNull String jdbcSubprotocol;
@@ -69,7 +70,7 @@ public class DataSourceProperties extends PoolProperties {
// default to save us from re-specifying this; note that it can still be
// overridden
- setDriverClassName(com.mysql.jdbc.Driver.class.getName());
+ setDriverClassName(DrizzleDriver.class.getName());
setDefaults();
}
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java
index 11a8ebe..9e43f24 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java
@@ -78,7 +78,7 @@ public class FineractPlatformTenantConnection {
}
public String databaseURL() {
- final String url = new StringBuilder("jdbc:mysql://").append(this.schemaServer).append(':').append(this.schemaServerPort)
+ final String url = new StringBuilder("jdbc:mysql:thin://").append(this.schemaServer).append(':').append(this.schemaServerPort)
.append('/').append(this.schemaName).toString();
return url;
}
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java
index 6365f1a..579b431 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java
@@ -22,14 +22,13 @@ import java.sql.Driver;
import java.sql.DriverManager;
import java.util.Enumeration;
+import org.apache.fineract.infrastructure.jobs.service.JobRegisterServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.stereotype.Service;
-import com.mysql.jdbc.AbandonedConnectionCleanupThread;
-
@Service
public class AbandonedConnectionCleanupShutdownListener implements ApplicationListener<ContextClosedEvent> {
@@ -45,12 +44,13 @@ public class AbandonedConnectionCleanupShutdownListener implements ApplicationLi
}
private void shutDowncleanUpThreadAndDeregisterJDBCDriver() {
- try {
- AbandonedConnectionCleanupThread.shutdown();
- logger.info("Shut-down of AbandonedConnectionCleanupThread successful");
+ /*try {
+
+ AbandonedConnectionCleanupThread.shutdown(); tomcat memoroy leak with mysql connector. With Drizzle not required
+ logger.info("Shut-down of AbandonedConnectionCleanupThread successful");
} catch (Throwable t) {
logger.error("Exception occurred while shut-down of AbandonedConnectionCleanupThread", t);
- }
+ }*/
// This manually deregisters JDBC driver, which prevents Tomcat 7 from
// complaining about memory leaks
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java
index a6a4445..074ab18 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java
@@ -33,6 +33,7 @@ import org.springframework.stereotype.Service;
import com.googlecode.flyway.core.Flyway;
import com.googlecode.flyway.core.api.FlywayException;
+import com.googlecode.flyway.core.util.jdbc.DriverDataSource;
/**
* A service that picks up on tenants that are configured to auto-update their
@@ -41,6 +42,7 @@ import com.googlecode.flyway.core.api.FlywayException;
@Service
public class TenantDatabaseUpgradeService {
+ private final String DRIVER_CLASS = "org.drizzle.jdbc.DrizzleDriver" ;
private final TenantDetailsService tenantDetailsService;
protected final DataSource tenantDataSource;
protected final TenantDataSourcePortFixService tenantDataSourcePortFixService;
@@ -61,7 +63,8 @@ public class TenantDatabaseUpgradeService {
final FineractPlatformTenantConnection connection = tenant.getConnection();
if (connection.isAutoUpdateEnabled()) {
final Flyway flyway = new Flyway();
- flyway.setDataSource(connection.databaseURL(), connection.getSchemaUsername(), connection.getSchemaPassword());
+ DriverDataSource source = new DriverDataSource(DRIVER_CLASS, connection.databaseURL(), connection.getSchemaUsername(), connection.getSchemaPassword()) ;
+ flyway.setDataSource(source);
flyway.setLocations("sql/migrations/core_db");
flyway.setOutOfOrder(true);
try {
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java
index dc4fa7f..4227bcc 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java
@@ -86,7 +86,7 @@ public class TomcatJdbcDataSourcePerTenantService implements RoutingDataSourceSe
final String jdbcUrl = tenantConnectionObj.databaseURL();
final PoolConfiguration poolConfiguration = new PoolProperties();
- poolConfiguration.setDriverClassName("com.mysql.jdbc.Driver");
+ poolConfiguration.setDriverClassName("org.drizzle.jdbc.DrizzleDriver");
poolConfiguration.setName(tenantConnectionObj.getSchemaName() + "_pool");
poolConfiguration.setUrl(jdbcUrl);
poolConfiguration.setUsername(tenantConnectionObj.getSchemaUsername());
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
index d006cd5..f919b70 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
@@ -19,6 +19,7 @@
package org.apache.fineract.portfolio.loanaccount.service;
import java.math.BigDecimal;
+import java.math.BigInteger;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -333,8 +334,8 @@ public class LoanArrearsAgingServiceImpl implements LoanArrearsAgingService, Bus
private void updateSchheduleWithPaidDetail(Map<Long, List<LoanSchedulePeriodData>> scheduleDate, List<Map<String, Object>> loanSummary) {
for (Map<String, Object> transactionMap : loanSummary) {
- Long loanId = (Long) transactionMap.get("loanId");
-
+ String longValue = transactionMap.get("loanId").toString() ; //From JDBC Template API, we are getting BigInteger but in other call, we are getting Long
+ Long loanId = Long.parseLong(longValue) ;
BigDecimal principalAmtPaid = (BigDecimal) transactionMap.get("principalAmtPaid");
BigDecimal principalAmtWrittenoff = (BigDecimal) transactionMap.get("principalAmtWrittenoff");
BigDecimal interestAmtPaid = (BigDecimal) transactionMap.get("interestAmtPaid");
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/resources/application.properties
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/resources/application.properties b/fineract-provider/src/main/resources/application.properties
index adbef74..3fd1cb5 100644
--- a/fineract-provider/src/main/resources/application.properties
+++ b/fineract-provider/src/main/resources/application.properties
@@ -1,2 +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.
+#
+
spring.profiles.default=basicauth
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/main/resources/sql/migrations/core_db/V48__adding-S3-Support.sql
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/resources/sql/migrations/core_db/V48__adding-S3-Support.sql b/fineract-provider/src/main/resources/sql/migrations/core_db/V48__adding-S3-Support.sql
index 5df104d..775e96e 100755
--- a/fineract-provider/src/main/resources/sql/migrations/core_db/V48__adding-S3-Support.sql
+++ b/fineract-provider/src/main/resources/sql/migrations/core_db/V48__adding-S3-Support.sql
@@ -31,7 +31,7 @@ ALTER TABLE `m_client`
ADD CONSTRAINT `FK_m_client_m_image` FOREIGN KEY (`image_id`) REFERENCES `m_image` (`id`);
/*Move existing image locations to new table*/
-drop procedure if exists migrate_customer_image_data;
+/*drop procedure if exists migrate_customer_image_data;
delimiter #
create procedure migrate_customer_image_data()
@@ -64,9 +64,10 @@ end#
delimiter ;
call migrate_customer_image_data();
-
+*/
+
/*Now drop the procedure*/
-drop procedure if exists migrate_customer_image_data;
+/*drop procedure if exists migrate_customer_image_data; */
/*Delete image key from client*/
ALTER TABLE `m_client` DROP COLUMN `image_key`;
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/2a45fe13/fineract-provider/src/test/resources/META-INF/context.xml
----------------------------------------------------------------------
diff --git a/fineract-provider/src/test/resources/META-INF/context.xml b/fineract-provider/src/test/resources/META-INF/context.xml
index 374c715..f5f1ba2 100644
--- a/fineract-provider/src/test/resources/META-INF/context.xml
+++ b/fineract-provider/src/test/resources/META-INF/context.xml
@@ -23,7 +23,7 @@
<Context>
<Resource type="javax.sql.DataSource" name="jdbc/mifosplatform-tenants"
- driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
+ driverClassName="org.drizzle.jdbc.DrizzleDriver" url="jdbc:mysql:thin://localhost:3306/mifosplatform-tenants"
username="root" password="mysql" validationQuery="select 1" maxActive="10"
maxIdle="4" />
</Context>
\ No newline at end of file