diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java index d349bc362d7..6698e3373b9 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java @@ -41,17 +41,14 @@ public class PolicyManagementServiceComponent { protected void activate(ComponentContext componentContext) { try { - PolicyConfigurationManager.getInstance().initConfig(); - PolicyManagementConfig config = PolicyConfigurationManager.getInstance().getDeviceManagementConfig(); - DataSourceConfig dsConfig = config.getPolicyManagementRepository().getDataSourceConfig(); PolicyManagementDAOFactory.init(dsConfig); - } catch (Throwable t) { - + String msg = "Error occurred while initializing the Policy management core."; + log.error(msg, t); } } diff --git a/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql b/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql index 94e01ca15c5..29f5b3075fe 100644 --- a/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql +++ b/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql @@ -10,8 +10,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE ID VARCHAR(20) NOT NULL, DESCRIPTION TEXT NULL DEFAULT NULL, NAME VARCHAR(100) NULL DEFAULT NULL, - DATE_OF_ENROLLMENT DATETIME NULL DEFAULT NULL, - DATE_OF_LAST_UPDATE DATETIME NULL DEFAULT NULL, + DATE_OF_ENROLLMENT BIGINT NULL DEFAULT NULL, + DATE_OF_LAST_UPDATE BIGINT NULL DEFAULT NULL, OWNERSHIP VARCHAR(45) NULL DEFAULT NULL, STATUS VARCHAR(15) NULL DEFAULT NULL, DEVICE_TYPE_ID INT(11) NULL DEFAULT NULL,