Hi Abhay,

I did everything mentioned in the steps below – Created my custom implementation of AtlasResourceMapper, added it in the lib and configured the Tagsync config parameter. However, I am seeing an exception in my <>/tagsync.log file:

12 Jun 2018 13:06:39 ERROR AtlasTagSource [Thread-7] - 187 Caught exception..:
org.json4s.package$MappingException: No usable value for values
Expected object but got JNothing
        at org.json4s.reflect.package$.fail(package.scala:96)
        at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$buildCtorArg(Extraction.scala:462)
        at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482)
        at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:482)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
        at scala.collection.AbstractTraversable.map(Traversable.scala:104)
        at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$instantiate(Extraction.scala:470)
        at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$result$6.apply(Extraction.scala:515)
        at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$result$6.apply(Extraction.scala:512)
        at org.json4s.Extraction$.org$json4s$Extraction$$customOrElse(Extraction.scala:524)
        at org.json4s.Extraction$ClassInstanceBuilder.result(Extraction.scala:512)
        at org.json4s.Extraction$.extract(Extraction.scala:351)
        at org.json4s.Extraction$.extract(Extraction.scala:42)
        at org.json4s.ExtractableJsonAstNode.extract(ExtractableJsonAstNode.scala:21)
        at org.json4s.native.Serialization$.read(Serialization.scala:71)
        at org.apache.atlas.typesystem.json.InstanceSerialization$.fromJsonReferenceable(InstanceSerialization.scala:371)
        at org.apache.atlas.typesystem.json.InstanceSerialization.fromJsonReferenceable(InstanceSerialization.scala)
        at org.apache.atlas.notification.AbstractMessageDeserializer$ReferenceableDeserializer.deserialize(AbstractMessageDeserializer.java:162)
        at org.apache.atlas.notification.AbstractMessageDeserializer$ReferenceableDeserializer.deserialize(AbstractMessageDeserializer.java:157)
        at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
        at com.google.gson.Gson.fromJson(Gson.java:803)
        at com.google.gson.Gson.fromJson(Gson.java:868)
        at com.google.gson.Gson$1.deserialize(Gson.java:126)
        at org.apache.atlas.notification.entity.EntityMessageDeserializer$EntityNotificationDeserializer.deserialize(EntityMessageDeserializer.java:73)
        at org.apache.atlas.notification.entity.EntityMessageDeserializer$EntityNotificationDeserializer.deserialize(EntityMessageDeserializer.java:69)
        at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
        at com.google.gson.Gson.fromJson(Gson.java:803)
        at com.google.gson.Gson.fromJson(Gson.java:868)
        at com.google.gson.Gson$1.deserialize(Gson.java:126)
        at org.apache.atlas.notification.entity.EntityMessageDeserializer$EntityNotificationDeserializer.deserialize(EntityMessageDeserializer.java:73)
        at org.apache.atlas.notification.entity.EntityMessageDeserializer$EntityNotificationDeserializer.deserialize(EntityMessageDeserializer.java:69)
        at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
        at com.google.gson.Gson.fromJson(Gson.java:803)
        at com.google.gson.Gson.fromJson(Gson.java:768)
        at com.google.gson.Gson.fromJson(Gson.java:717)
        at org.apache.atlas.notification.AtlasNotificationMessageDeserializer.deserialize(AtlasNotificationMessageDeserializer.java:210)
        at org.apache.atlas.kafka.AtlasKafkaConsumer.receive(AtlasKafkaConsumer.java:72)
        at org.apache.ranger.tagsync.source.atlas.AtlasTagSource$ConsumerRunnable.run(AtlasTagSource.java:165)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.json4s.package$MappingException: Expected object but got JNothing
        at org.json4s.Extraction$.extract(Extraction.scala:336)
        at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$buildCtorArg(Extraction.scala:450)
        ... 39 more

My Apache Ranger version is 0.7.0 and Atlas version is 1.0.0.

I thought this may be due to incompatible Atlas Notification message in Kafka so I added the following config in Atlas:

 atlas.notification.entity.version=v1

Then I deleted ATLAS_ENTITIES kafka topic to flush old messages, restarted Atlas, Ranger and retried. Again, I am seeing similar exception:

12 Jun 2018 20:19:22 ERROR AtlasTagSource [Thread-7] - 187 Caught exception..:
org.json4s.package$MappingException: No usable value for traits
No usable value for values
Expected object but got JNull
        at org.json4s.reflect.package$.fail(package.scala:96)