[ 
https://issues.apache.org/jira/browse/ATLAS-4956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18052772#comment-18052772
 ] 

Aditya Gupta commented on ATLAS-4956:
-------------------------------------

Fix is working as expected:

curl -u admin:admin -X POST http://localhost:21000/api/atlas/v2/types/typedefs 
-H "Content-Type: application/json" -H "Accept: application/json" -d '{
  "classificationDefs": [
    {
      "category": "CLASSIFICATION",
      "name": "description",
      "description": "Tag to mark PII data",
      "typeVersion": "1.0",
      "attributeDefs": [
        {
          "name": "tag_description",
          "typeName": "string",
          "isOptional": true,
          "cardinality": "SINGLE",
          "valuesMinCount": 0,
          "valuesMaxCount": 1
        }
      ]
    }
  ]
}'
{"errorCode":"ATLAS-400-00-102","errorMessage":"Unsupported CLASSIFICATION 
name. Names such as description,version,options,name,servicetype are not 
supported"}

> Creating tag with name description throws java.lang.ClassCastException
> ----------------------------------------------------------------------
>
>                 Key: ATLAS-4956
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4956
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>            Reporter: Priyanshi Shah
>            Assignee: Aditya Gupta
>            Priority: Major
>             Fix For: 3.0.0, 2.5.0
>
>         Attachments: image-2026-01-19-12-44-22-594.png
>
>
> Attempt to create a tag with name "description" , Atlas throws 500 with 
> following exception:
> {code:java}
> 2024-12-31 17:54:36,378 [etp940087898-232 - 
> fdf1467f-1146-493b-8b24-6ee25dc089ba] ERROR [ExceptionMapperUtil.java:32] 
> Error handling a request: 22206345b8ffa8f0
> java.lang.ClassCastException: java.lang.String cannot be cast to 
> java.util.List
>         at 
> org.apache.atlas.repository.store.graph.v2.AtlasStructDefStoreV2.toStructDef(AtlasStructDefStoreV2.java:495)
>         at 
> org.apache.atlas.repository.store.graph.v2.AtlasClassificationDefStoreV2.toClassificationDef(AtlasClassificationDefStoreV2.java:355)
>         at 
> org.apache.atlas.repository.store.graph.v2.AtlasClassificationDefStoreV2.create(AtlasClassificationDefStoreV2.java:103)
>         at 
> org.apache.atlas.repository.store.graph.v2.AtlasClassificationDefStoreV2.create(AtlasClassificationDefStoreV2.java:46)
>         at 
> org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore.addToGraphStore(AtlasTypeDefGraphStore.java:1016)
>         at 
> org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore.createTypesDef(AtlasTypeDefGraphStore.java:399)
>         at 
> org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore$$FastClassBySpringCGLIB$$5226c80b.invoke(<generated>)
>         at 
> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
>         at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
>         at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
>         at 
> org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:111)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
>         at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
>         at 
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
>         at 
> org.apache.atlas.repository.store.graph.v2.AtlasTypeDefGraphStoreV2$$EnhancerBySpringCGLIB$$674192d4.createTypesDef(<generated>)
>         at 
> org.apache.atlas.web.rest.TypesREST.createAtlasTypeDefs(TypesREST.java:399)
>  {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to