if (LOG.isDebugEnabled()) {
LOG.debug("Creating view instance " + viewName + "/" +
version + "/" + instanceName);
}
instanceEntity.validate(viewEntity);
<BUG>instanceDAO.create(instanceEntity);
</BUG>
try {
bindViewInstance(viewEntity, instanceEntity);
} catch (Exception e) {

if (LOG.isDebugEnabled()) {
LOG.debug("Creating view instance " + viewName + "/" +
version + "/" + instanceName);
}
instanceEntity.validate(viewEntity);
instanceDAO.merge(instanceEntity);
try {
bindViewInstance(viewEntity, instanceEntity);
} catch (Exception e) {
