diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/types/SchemaManagementImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/types/SchemaManagementImpl.java index 5f6e5a8..363d157 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/types/SchemaManagementImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/types/SchemaManagementImpl.java @@ -383,6 +383,9 @@ public class SchemaManagementImpl implements SchemaManagement { OMetadata oMetadata = oDatabaseDocument.getMetadata(); OSchema oSchema = oMetadata.getSchema(); OClass baseOClass = oSchema.getClass(typeName); + if(baseOClass == null) { + throw new SchemaNotFoundException(typeName + " does not Exists"); + } List typeDefinitions = new ArrayList<>(); typeDefinitions.add(getType(baseOClass));