Resolved: KSQLDB: write custom UDAF with struct type (annotationparser exception)

In this post, we will see how to resolve KSQLDB: write custom UDAF with struct type (annotationparser exception)


Im trying to write a custom UDAF for KSQLDB.
First i wanted to try out the example:
The Schemas of the structs will be submited via the Schemas_describtor. “This communicates the underlying types to ksqlDB in a way that its type system can understand.” F.E
When i build the shadowJar and submit it to ksqldbs extension_dir without the Schemas(param,aggregate and return), KSQLDB is starting up with no errors and the function is showing up. I need to use structs, so i need to submit a schema to ksqldb. When i add the SchemaDescriptor to the UDAF Factory, i get a null pointer exception from Java and an annotationParser exception. SchemaBuilder and descriptor, gradle and logs below:
(I just copied the class from the example)
Error Log of KSQLDB:
My Gradle Build file has the following dependecies:
I really dont know why KSQLDB cant parse the Schema (Its a provided example class from KSQLDB)…

Best Answer:

I am able to submit the UDAF with param,aggregate and return Schema without an annotationParser Exception after downgrading from:

If you have better answer, please add a comment about this, thank you!