我试图捕捉 VDB 部署时引发的异常,但无法捕捉但登录到 teiid 记录器。
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);
}
当我尝试通过创建 vdb 来测试连接参数并尝试部署 vdb 时。如果所有参数都正确,则很好,但如果有任何参数错误,则期望对各个错误参数(例如未知主机异常)进行适当的异常处理。