I am getting the following when running Apache NIFI 1.25 On Fri, Mar 8, 2024 at 1:21 PM Dan S <dsti...@gmail.com> wrote:
> I am trying to create a flow to stop the StandardJsonSchemaRegistry and to > update it with more JSON schemas using the NIFI Rest API. I figured I will > need to use the MergeRecord processor to merge the ControllerServiceEntity > JSON (returned after stopping the StandardJsonSchemaRegistry controller > service) with JSON schemas that I have on the file system. > I wasn't sure how to write an Avro schema for the ControllerServiceEntity > so I thought I would start off by trying to use JsonTreeReader with Schema > Access Strategy set to Infer schema and a JsonRecordSetWriter to write the > schema out in an instance of ConvertRecord processor. When trying to > convert the ControllerServiceEntity JSON I got the following stacktrace > below. I have attached the ControllerServiceEntity JSON which I tried to > convert. Please advise whether I should create a ticket for this or not. > Thanks! > > 2024-03-08 17:41:26,198 ERROR [Timer-Driven Process Thread-2] > o.a.n.processors.standard.ConvertRecord > ConvertRecord[id=1f213eb6-018e-1000-e76a-b9ac6041ed48] Failed to process > StandardFlowFileRecord[uuid=45aa31af-0850-42be-9f9e-05001acbf8f2,claim=StandardContentClaim > [resourceClaim=StandardResourceClaim[id=1709914518257-1, container=default, > section=1], offset=34287, > length=14358],offset=0,name=sampleAfterDisablingStandardJsonSchemaRegistry.json,size=14358]; > will route to failure > org.apache.avro.SchemaParseException: Illegal character in: > component_descriptors_JSON Schema Version_allowableValues_allowableValueType > at org.apache.avro.Schema.validateName(Schema.java:1625) > at org.apache.avro.Schema.access$400(Schema.java:94) > at org.apache.avro.Schema$Name.<init>(Schema.java:713) > at org.apache.avro.Schema.createRecord(Schema.java:226) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroSchema(AvroTypeUtil.java:287) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroField(AvroTypeUtil.java:130) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroSchema(AvroTypeUtil.java:284) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroSchema(AvroTypeUtil.java:211) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroField(AvroTypeUtil.java:130) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroSchema(AvroTypeUtil.java:284) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroField(AvroTypeUtil.java:130) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroSchema(AvroTypeUtil.java:284) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroField(AvroTypeUtil.java:130) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroSchema(AvroTypeUtil.java:284) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroField(AvroTypeUtil.java:130) > at org.apache.nifi.avro.AvroTypeUtil.buildAvroSchema(AvroTypeUtil.java:122) > at > org.apache.nifi.avro.AvroTypeUtil.extractAvroSchema(AvroTypeUtil.java:102) > at > org.apache.nifi.schema.access.WriteAvroSchemaAttributeStrategy.lambda$new$0(WriteAvroSchemaAttributeStrategy.java:36) > at > com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$2(LocalLoadingCache.java:145) > at > com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2406) > at > java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916) > at > com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2404) > at > com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2387) > at > com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108) > at > com.github.benmanes.caffeine.cache.LocalLoadingCache.get(LocalLoadingCache.java:56) > at > org.apache.nifi.schema.access.WriteAvroSchemaAttributeStrategy.getAttributes(WriteAvroSchemaAttributeStrategy.java:53) > at > org.apache.nifi.json.WriteJsonResult.writeRecord(WriteJsonResult.java:151) > at > org.apache.nifi.serialization.AbstractRecordSetWriter.write(AbstractRecordSetWriter.java:59) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > at > org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:254) > at > org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.access$100(StandardControllerServiceInvocationHandler.java:38) > at > org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler$ProxiedReturnObjectInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:240) > at jdk.proxy18/jdk.proxy18.$Proxy180.write(Unknown Source) > at > org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:153) > at > org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:3432) > at > org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:122) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1361) > at > org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:247) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102) > at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110) > at > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) > at > java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) > at > java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) > at java.base/java.lang.Thread.run(Thread.java:833) >