```SLF4J: Failed to load class "org.slf4j.impl.Sta...
# troubleshoot
b
Copy code
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.
Exception in thread "main" java.lang.RuntimeException: Failed to validate DataHub PDL models
        at com.linkedin.metadata.model.validation.ModelValidationTask.main(ModelValidationTask.java:50)
Caused by: com.linkedin.metadata.models.ModelValidationException: Found invalid relationship with name OwnedBy at path /orgOwner. Invalid entityType(s) provided.
        at com.linkedin.metadata.models.EntitySpecBuilder.failValidation(EntitySpecBuilder.java:323)
        at com.linkedin.metadata.models.EntitySpecBuilder.buildEntitySpecs(EntitySpecBuilder.java:74)
        at com.linkedin.metadata.model.validation.ModelValidationTask.main(ModelValidationTask.java:48)
Not sure why the validation task fails. We are trying to extend the model and use the 'OwnedBy' relationship between other entities but the build fails with the above error. Is there a specific rule regarding 'OwnedBy' relationship that we are missing?
e
Can you show us the annotation you added? Feel free to obfuscate field names etc. if needed!
b
Copy code
@Relationship = {
      "name": "OwnedBy",
      "entityTypes": [ "squad" ]
    }
    orgOwner: Urn
@early-lamp-41924, when I provide corpGroup/corpUser as the entityType it works fine . So unless there is a particular rule that I am missing, I am not sure how to proceed
e
Is squad a new entity you are creating? This field should indicate what type of entity this urn is referring to. From here, seems like it should point to corpGroup entities
so shouldn’t be specific to specific value of entity
b
Yes, squad is a new entity that I am creating.
e
Not a type right?
Yeah annotations should not be entity specific but rather denote overall relationships between entity types. So here you should add corpGroup
b
I think you and Pratick are using the term entity differently. We defined a new set of models (SquadKey.pdl, SquadInfo.pdl, SquadSnapshot.pdl) to represent the Squad entityType. In the past we had been using the term Entity to refer to both [an instance of data] and [data types], which was confusing to be sure. Given that, the problem is in fact that we want to use our entityType, not the built-in CorpGroup type, because our model is enough different from corpGroup that we wanted something different.
e
Got it! Understood now. Are you using the config file based entity registration? Just realized by reading through that task throwing error that it currently only supports the old way of registering a new entity. The old way we are trying to deprecate is to add to the Snapshot.pdl https://github.com/linkedin/datahub/blob/master/metadata-models/src/main/pegasus/com/linkedin/metadata/snapshot/Snapshot.pdl This means creating a snapshot of the new entity type. We will get a fix out for this task asap, but if you want to try it out at the current state, can you try following this old way?
b
Ah I see. That did it.
e
Awesome!
b
Thanks @early-lamp-41924