{"record":{"id":"56d3623353822ff1","repo":"apache/pulsar","slug":"the-message-payload-processor-class-s-does-not-ex","errorCode":null,"errorMessage":"The message payload processor class %s does not exist","messagePattern":"The message payload processor class (.+?) does not exist","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/ValidatorUtils.java","lineNumber":113,"sourceCode":"                            conf.getCryptoKeyReaderClassName()));\n        }\n\n        if (isProducer && (conf.getEncryptionKeys() == null || conf.getEncryptionKeys().length == 0)) {\n            throw new IllegalArgumentException(\"Missing encryption key name for producer crypto key reader\");\n        }\n    }\n\n    public static void validateMessagePayloadProcessor(MessagePayloadProcessorConfig conf, TypePool typePool) {\n        if (isEmpty(conf.getClassName())) {\n            return;\n        }\n\n        String payloadProcessorClassName = conf.getClassName();\n        TypeDescription payloadProcessorClass = null;\n        try {\n            payloadProcessorClass = typePool.describe(payloadProcessorClassName).resolve();\n        } catch (TypePool.Resolution.NoSuchTypeException e) {\n            throw new IllegalArgumentException(\n                    String.format(\"The message payload processor class %s does not exist\", payloadProcessorClassName));\n        }\n        if (!payloadProcessorClass.asErasure().isAssignableTo(MessagePayloadProcessor.class)) {\n            throw new IllegalArgumentException(String.format(\"%s does not implement %s\", payloadProcessorClassName,\n                    MessagePayloadProcessor.class.getName()));\n        }\n\n        boolean hasConstructor;\n        if (conf.getConfig() == null || conf.getConfig().isEmpty()) {\n            hasConstructor = payloadProcessorClass.getDeclaredMethods().stream()\n                    .anyMatch(method -> method.isConstructor() && method.getParameters().size() == 0);\n        } else {\n            hasConstructor = payloadProcessorClass.getDeclaredMethods().stream()\n                    .anyMatch(method -> method.isConstructor() && method.getParameters().size() == 1\n                            && method.getParameters().get(0).getType().asErasure().represents(Map.class));\n        }\n\n        if (!hasConstructor) {","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/ValidatorUtils.java#L95-L131","documentation":"validateMessagePayloadProcessor resolves conf.getClassName() via a ByteBuddy TypePool; when the named MessagePayloadProcessor class cannot be found on the classpath (NoSuchTypeException) this IllegalArgumentException is thrown. The payload processor handles BatchSource payload decoding (e.g. Avro, Parquet).","triggerScenarios":"Configuring a MessagePayloadProcessorConfig with a className that is missing from the function jar or worker classpath, or a typo in the FQCN.","commonSituations":"Referencing a built-in processor class (e.g. AvroPayloadProcessor) that is not shipped with the worker version; custom processor jar not uploaded; package renamed across Pulsar releases.","solutions":["Correct the className in the payload processor config","Package the MessagePayloadProcessor implementation into the submitted jar","Use a processor class confirmed to exist in your Pulsar version (check the org.apache.pulsar.functions.utils.collections / processor packages for your release)"],"exampleFix":"// before\n// className: com.acme.OldProcessor // removed in this Pulsar version\n// after\n// className: org.apache.pulsar.functions.avro.AvroPayloadProcessor // exists in classpath","handlingStrategy":"validation","validationCode":"try {\n    Class.forName(conf.getClassName());\n} catch (ClassNotFoundException e) {\n    throw new IllegalStateException(\"Payload processor class missing: \" + conf.getClassName());\n}","typeGuard":null,"tryCatchPattern":"try {\n    ValidatorUtils.validateMessagePayloadProcessor(conf, typePool);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().endsWith(\"does not exist\")) {\n        // correct className or package the processor class\n    }\n    throw e;\n}","preventionTips":["Confirm the processor class exists in your Pulsar release before referencing it","Package custom processors in the function jar","Watch for package renames across Pulsar upgrades and update configs accordingly"],"tags":["pulsar-functions","payload-processor","class-not-found","bytebuddy"],"backgroundTag":"class-not-found","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}