mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing the compilation failure issues.
This commit is contained in:
parent
d882a05833
commit
810c0383a8
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
* WSO2 Inc. 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.wso2.carbon.device.application.mgt.common.exception;
|
||||
|
||||
public class InvalidConfigurationException extends ApplicationManagementException {
|
||||
|
||||
public InvalidConfigurationException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
public InvalidConfigurationException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,6 +22,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
|
||||
import org.wso2.carbon.device.application.mgt.common.exception.InvalidConfigurationException;
|
||||
import org.wso2.carbon.device.application.mgt.core.util.ApplicationManagementUtil;
|
||||
import org.wso2.carbon.device.application.mgt.core.util.ApplicationManagerConstants;
|
||||
import org.wso2.carbon.utils.CarbonUtils;
|
||||
@ -71,7 +72,7 @@ public class ApplicationConfigurationManager {
|
||||
this.applicationManagerConfiguration = (ApplicationManagementConfigurations) unmarshaller.unmarshal(doc);
|
||||
} catch (Exception e) {
|
||||
log.error(e);
|
||||
throw new ApplicationManagementException("Error occurred while initializing application config", e);
|
||||
throw new InvalidConfigurationException("Error occurred while initializing application config", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -41,11 +41,6 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
||||
ConnectionManagerUtil.openConnection();
|
||||
ApplicationDAO applicationDAO = ApplicationManagementDAOFactory.getApplicationDAO();
|
||||
return applicationDAO.getApplications(filter);
|
||||
} catch (ApplicationManagementDAOException e) {
|
||||
throw new ApplicationManagementException("Error occurred while obtaining the applications for " +
|
||||
"the given filter.", e);
|
||||
} catch (DBConnectionException e) {
|
||||
throw new ApplicationManagementException("Error occurred while opening a connection to the APPM data source", e);
|
||||
} finally {
|
||||
ConnectionManagerUtil.closeConnection();
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
|
||||
import org.wso2.carbon.device.application.mgt.common.exception.InvalidConfigurationException;
|
||||
import org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceFactory;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
@ -54,7 +55,7 @@ public class ApplicationManagementUtil {
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
return docBuilder.parse(file);
|
||||
} catch (Exception e) {
|
||||
throw new ApplicationManagementException("Error occurred while parsing file, while converting " +
|
||||
throw new InvalidConfigurationException("Error occurred while parsing file, while converting " +
|
||||
"to a org.w3c.dom.Document : ", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,21 +75,6 @@
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.18</version>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<log4j.configuration>file:src/test/resources/log4j.properties</log4j.configuration>
|
||||
</systemPropertyVariables>
|
||||
<suiteXmlFiles>
|
||||
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
|
||||
</suiteXmlFiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user