Pinal Shah created ATLAS-4863: --------------------------------- Summary: NPE while deleting BusinessMetadata Key: ATLAS-4863 URL: https://issues.apache.org/jira/browse/ATLAS-4863 Project: Atlas Issue Type: Bug Components: atlas-core Reporter: Pinal Shah Assignee: Pinal Shah
If businessMetadata is created without adding any applicable types, we get NullPointerException when we try to delete that businessmetadata. Example: {code:java} { "category": "BUSINESS_METADATA", "guid": "678dc8e1-3897-4b43-94f2-929ea984e8d9", "createdBy": "h0650206", "updatedBy": "h0650206", "createTime": 1714471319783, "updateTime": 1714731363238, "version": 3, "name": "test_create_bussiness_metadata", "description": "test_create_bussiness_metadata", "typeVersion": "1.1", "attributeDefs": [ { "name": "test", "typeName": "string", "isOptional": true, "cardinality": "SINGLE", "valuesMinCount": 0, "valuesMaxCount": 1, "isUnique": false, "isIndexable": true, "includeInNotification": false, "searchWeight": 0, "options": { "applicableEntityTypes": "[]", "maxStrLength": "50" } } ] } {code} If above businessMetadata type is deleted, we get below exception {code:java} java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:221) at java.base/java.lang.String.join(String.java:2440) at org.apache.atlas.repository.store.graph.v2.AtlasBusinessMetadataDefStoreV2.isBusinessAttributePresent(AtlasBusinessMetadataDefStoreV2.java:425) at org.apache.atlas.repository.store.graph.v2.AtlasBusinessMetadataDefStoreV2.checkBusinessMetadataRef(AtlasBusinessMetadataDefStoreV2.java:408) at org.apache.atlas.repository.store.graph.v2.AtlasBusinessMetadataDefStoreV2.preDeleteByGuid(AtlasBusinessMetadataDefStoreV2.java:342) at org.apache.atlas.repository.store.graph.v2.AtlasAbstractDefStoreV2.deleteByGuid(AtlasAbstractDefStoreV2.java:153) at org.apache.atlas.repository.store.graph.v2.AtlasBusinessMetadataDefStoreV2.deleteByGuid(AtlasBusinessMetadataDefStoreV2.java:55) at org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore.deleteTypesDef(AtlasTypeDefGraphStore.java:669) at org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore.deleteTypeByName(AtlasTypeDefGraphStore.java:714) at org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore$$FastClassBySpringCGLIB$$5226c80b.invoke(<generated>) {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)