Lari Hotari
08/20/2026, 1:08 PMSchema.AVRO(MyPojo.class) throws SecurityException on produce and consume. Schema.JSON is not affected.
• Handled for you — broker types, plus Pulsar Functions and IO connectors, which trust the deployed code's class loader.
• Applications declare their own POJOs — AvroTrustedClasses.trust(Order.class), which also covers what the class references.
• ⚠️ Avro's own error message misleads shaded-client users — the property and class it names are relocated in pulsar-client / pulsar-client-all, so following it produces an identical failure.
Full details on dev@: lists.apache.org/thread/…Lari Hotari
08/20/2026, 1:09 PMLari Hotari
08/21/2026, 9:28 AMSchema.AVRO(...) or Schema.PROTOBUF(...), Pulsar already derives the schema from that class, so it can trust exactly the types that schema uses.
• Same for Functions, connectors and the broker — they go through the same calls, so nothing special is needed for them either.
• Schema.AUTO_CONSUME() is unaffected in the normal case — it decodes into GenericRecord without loading your classes at all.
• One narrow gap remains — a topic whose schema isn't a record at the top level. That shape is unusual, so the risk of breaking an existing application is minor.
Details on dev@: lists.apache.org/thread/…