[
https://issues.apache.org/jira/browse/NIFI-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16076514#comment-16076514
]
ASF GitHub Bot commented on NIFI-1763:
--------------------------------------
Github user YolandaMDavis commented on the issue:
https://github.com/apache/nifi/pull/1938
@markap14 I’m not quite sure if I ran into a configuration problem on my
part or if this is truly an issue. I’m testing the ConfluentSchemaRegistry and
do have it set up in NiFi with two small flows that places data onto a kafka
topic and reads from that same topic then saves data into the filesystem. I
did confirm that the Controller Service itself appears to work since I was able
to register a schema and get an AvroReader/RecordSetWriter and a JsonTreeReader
to refer to the schema within that registry. However when I wanted to use the
option to write the Schema using the Confluent Schema Registry Reference
(specifically within the AvroRecordSetWriter in my test) I’m getting a
NullPointerException:
`2017-07-06 05:48:35,364 ERROR [Timer-Driven Process Thread-8]
o.a.n.p.k.pubsub.PublishKafkaRecord_0_10
PublishKafkaRecord_0_10[id=16230624-015d-1000-7474-292c6c453e5a] Failed to send
all message for
StandardFlowFileRecord[uuid=007abeb3-5d2e-4c11-b9ef-e279b7822348,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=149931562458
4-1, container=default, section=1], offset=683586,
length=20],offset=0,name=11741764036465,size=20] to Kafka; routing to failure
due to java.lang.NullPointerException: {}
java.lang.NullPointerException: null
at
org.apache.nifi.serialization.SchemaRegistryRecordSetWriter.getSchemaAccessWriter(SchemaRegistryRecordSetWriter.java:136)
at
org.apache.nifi.avro.AvroRecordSetWriter.createWriter(AvroRecordSetWriter.java:107)
at sun.reflect.GeneratedMethodAccessor374.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89)
at com.sun.proxy.$Proxy131.createWriter(Unknown Source)
at
org.apache.nifi.processors.kafka.pubsub.PublisherLease.publish(PublisherLease.java:109)
at
org.apache.nifi.processors.kafka.pubsub.PublishKafkaRecord_0_10$1.process(PublishKafkaRecord_0_10.java:338)
at
org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2136)
at
org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2106)
at
org.apache.nifi.processors.kafka.pubsub.PublishKafkaRecord_0_10.onTrigger(PublishKafkaRecord_0_10.java:330)
at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1120)
at
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
at
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
at
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)`
I did see a note about potentially experiencing an exception if the schema
didn’t include the identifier and version however I wasn’t quite expecting the
exception to be a Nullpointer. Is this expected behavior? I did confirm that
if I used another option (e.g. Set schema.name or Do Not Write Schema) that I
did not encounter this problem.
> Provide an integration with 'Schema registry for Kafka'
> -------------------------------------------------------
>
> Key: NIFI-1763
> URL: https://issues.apache.org/jira/browse/NIFI-1763
> Project: Apache NiFi
> Issue Type: Wish
> Components: Extensions
> Reporter: Joseph Witt
> Assignee: Mark Payne
> Priority: Minor
>
> Reported on a mailing list question on 13 April 2016
> https://github.com/confluentinc/schema-registry
> The registry itself is an ASLv2 licensed codebase. It offers a REST-based
> Web API for interaction. It would be good to support integration with it for
> users of Kafka so it would register schemas if needed when writing to Kafka
> and understand how to parse data based on the indicated schema when reading
> from Kafka.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)