Search in sources :

Example 41 with AgentException

use of com.axway.ats.agent.core.exceptions.AgentException in project ats-framework by Axway.

the class SystemMonitor method stopMonitoringProcessOnAgent.

private void stopMonitoringProcessOnAgent(String monitoredAgent) throws MonitoringException {
    try {
        log.debug("Stopping system monitoring on " + monitoredAgent + " agent");
        new AgentMonitoringClient(monitoredAgent).stopMonitoring();
        log.debug("Successfully stopped monitoring " + monitoredAgent + " agent");
    } catch (AgentException e) {
        throw new MonitoringException("Could not stop monitoring " + monitoredAgent + " agent", e);
    }
}
Also used : AgentMonitoringClient(com.axway.ats.agent.webapp.client.AgentMonitoringClient) AgentException(com.axway.ats.agent.core.exceptions.AgentException) MonitoringException(com.axway.ats.monitoring.model.exceptions.MonitoringException)

Example 42 with AgentException

use of com.axway.ats.agent.core.exceptions.AgentException in project ats-framework by Axway.

the class Test_ConfigurationParser method testDB_NoDbNameServiceNameAndSID_forMySQL.

@Test
public void testDB_NoDbNameServiceNameAndSID_forMySQL() throws Exception {
    InputStream _descriptorFileStream = Test_ConfigurationParser.class.getClassLoader().getResourceAsStream("test_descriptors/test_agent_descriptor_no_db_name_sid_sname_mysql.xml");
    ConfigurationParser configParser = new ConfigurationParser();
    try {
        configParser.parse(_descriptorFileStream, jarFileAbsolutePath);
        fail();
    } catch (AgentException ae) {
        assertEquals("No DB Name is specified.", ae.getMessage());
    }
}
Also used : InputStream(java.io.InputStream) AgentException(com.axway.ats.agent.core.exceptions.AgentException) Test(org.junit.Test)

Aggregations

AgentException (com.axway.ats.agent.core.exceptions.AgentException)42 IOException (java.io.IOException)16 ArrayList (java.util.ArrayList)11 AgentException_Exception (com.axway.ats.agent.webapp.client.AgentException_Exception)9 AgentService (com.axway.ats.agent.webapp.client.AgentService)8 ByteArrayOutputStream (java.io.ByteArrayOutputStream)7 ObjectOutputStream (java.io.ObjectOutputStream)7 NoSuchComponentException (com.axway.ats.agent.core.exceptions.NoSuchComponentException)6 InternalComponentException (com.axway.ats.agent.webapp.client.InternalComponentException)6 InternalComponentException_Exception (com.axway.ats.agent.webapp.client.InternalComponentException_Exception)6 ActionExecutionException (com.axway.ats.agent.core.exceptions.ActionExecutionException)5 InternalComponentException (com.axway.ats.agent.core.exceptions.InternalComponentException)5 NoCompatibleMethodFoundException (com.axway.ats.agent.core.exceptions.NoCompatibleMethodFoundException)5 NoSuchActionException (com.axway.ats.agent.core.exceptions.NoSuchActionException)5 MonitoringException (com.axway.ats.monitoring.model.exceptions.MonitoringException)5 ByteArrayInputStream (java.io.ByteArrayInputStream)5 ObjectInputStream (java.io.ObjectInputStream)5 WebMethod (javax.jws.WebMethod)5 DatabaseEnvironmentUnit (com.axway.ats.environment.database.DatabaseEnvironmentUnit)4 File (java.io.File)4