String type = attributes.getProperty("type");
type = vars.typeHandlerFactory.resolveAlias(type);
try {
vars.errorCtx.setMoreInfo("Check the data source type or class.");
DataSourceFactory dsFactory = (DataSourceFactory) Resources.instantiate(type);
vars.errorCtx.setMoreInfo("Check the data source properties or configuration.");
dsFactory.initialize(vars.dsProps);
vars.dataSource = dsFactory.getDataSource();
vars.errorCtx.setMoreInfo(null);
} catch (Exception e) {
if (e instanceof SqlMapException) {
throw (SqlMapException) e;
} else {