CatalogBuilder builder = new CatalogBuilder(getCatalog());
builder.setStore(dsInfo);
FeatureTypeInfo fti = builder.buildFeatureType(ds.getFeatureSource(vt.getName()));
fti.getMetadata().put(FeatureTypeInfo.JDBC_VIRTUAL_TABLE, vt);
LayerInfo layerInfo = builder.buildLayer(fti);
setResponsePage(new ResourceConfigurationPage(layerInfo, true));
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Failed to create feature type", e);
error(new ParamResourceModel("creationFailure", this, getFirstErrorMessage(e))
.getString());