} catch (Exception e) {
LOG.error("Caught exception adding view instance for view " +
viewDefinition.getViewName(), e);
}
}
<BUG>instanceDefinitions.addAll(persistView(viewDefinition));
addDefinition(viewDefinition);</BUG>
for (ViewInstanceEntity instanceEntity : instanceDefinitions) {
addInstanceDefinition(viewDefinition, instanceEntity);
}

} catch (Exception e) {
LOG.error("Caught exception adding view instance for view " +
viewDefinition.getViewName(), e);
}
}
syncView(viewDefinition, instanceDefinitions);
addDefinition(viewDefinition);
for (ViewInstanceEntity instanceEntity : instanceDefinitions) {
addInstanceDefinition(viewDefinition, instanceEntity);
}
