I am trying to catch the exception thrown at the time of VDB deployment but unable to catch but get logged in teiid logger.
byte[] vdbBytes = vdbHelper.getVdbByteArray(theVDB);
try {
// Deployment name for vdb must end in '-vdb.xml'.
String deploymentName = vdbName + Constants.DYNAMIC_VDB_SUFFIX;
// Deploy the VDB
clientAccessor.getClient().deploy(deploymentName, new ByteArrayInputStream(vdbBytes));
// Wait for VDB to finish loading
long timeSt = new Date().getTime();
//logger.info("deployVdb(VDBMetaData theVDB, String vdbName, int deploymentTimeout) entering.. date "+new Timestamp(new Date().getTime()));
waitForVDBLoad(vdbName, 1, deploymentTimeout);
long timeEnd = new Date().getTime();
//logger.info("deployVdb(VDBMetaData theVDB, String vdbName, int deploymentTimeout) entering.. date "+new Timestamp(new Date().getTime()) + " time in long - " + ((timeEnd-timeSt)));
//logger.info(METHOD_NAME + " Exiting.");
}catch(Exception e) {
System.err.println(e);
}
As I am trying test the connection parameters by creating vdb and try to deploy the vdb. If all parameters is correct then its fine but if there any parameters are wrong then expecting proper exception handling for respective wrong parameters such as Unknown Host exception,.