diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/resources/impl/EntityManagementImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/resources/impl/EntityManagementImpl.java index 9126599..b419173 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/resources/impl/EntityManagementImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/resources/impl/EntityManagementImpl.java @@ -909,7 +909,7 @@ public class EntityManagementImpl implements EntityManagement { throw new ResourceRegistryException("Error Updating Facet", e.getCause()); } finally { - if (orientGraph != null) { + if (orientGraph != null && !orientGraph.isClosed()) { orientGraph.shutdown(); } }