Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

SAM fail to get schema from Schema Registry

avatar
Master Collaborator

Following the instruction under link below to build my first SAM applicaiton

https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.0/bk_getting-started-with-stream-analytics/co...

I kept getting error with the kafka source added with error message as "Schema not found"

17434-screen-shot-2017-06-16-at-21501-pm.png

While looking at the SAM log, I got 404 error

INFO   [18:14:55.230] [dw-95 - GET /api/v1/schemas/truck_events_avro] c.h.s.s.s.SchemaResource -  Received path: [truck_events_avro]
ERROR  [18:14:55.269] [dw-95 - GET /api/v1/schemas/truck_events_avro] c.h.s.s.s.SchemaResource -  Got exception: [RuntimeException] / message [javax.ws.rs.NotFoundException: HTTP 404 Not Found] / related resource location: [com.hortonworks.streamline.streams.service.SchemaResource.getKafkaSourceSchema](SchemaResource.java:131)

Where on Registry log, it seems that the schema SAM try to get does not exist, the request did get through but no schema exist with that schema key

INFO   [18:14:55.260] [dw-19350 - GET /api/v1/schemaregistry/schemas/truck_events_avro/versions/latest] c.h.r.s.w.SchemaRegistryResource -  No schemas found with schemakey: [truck_events_avro]

I did create all the schema in SchemaRegistry following the steps in the guide and I can see all the schema from the dash board on http://REGISTRY_SERVER:7788/

17435-screen-shot-2017-06-16-at-22208-pm.png

However, when try to get the schema with API from http://REGISTRY_SERVER:7788/api/v1/schemaregistry/schemas/truck_events_avro/versions/latest i got the same error like in registry.log

{"responseCode":1101,"responseMessage":"Entity with id [truck_events_avro] not found."}

Any suggestions on how to fix the probelm?

1 ACCEPTED SOLUTION

avatar
Master Collaborator

17436-screen-shot-2017-06-16-at-40521-pm.png

Found the reason. I was following an older version which has the schema registered with name postfix ":v", it apparently is not needed any more. So after register the schema again with name as the kafka topic, everything works fine.

View solution in original post

2 REPLIES 2

avatar

avatar
Master Collaborator

17436-screen-shot-2017-06-16-at-40521-pm.png

Found the reason. I was following an older version which has the schema registered with name postfix ":v", it apparently is not needed any more. So after register the schema again with name as the kafka topic, everything works fine.