{"record":{"id":"1d308aa50fef23c8","repo":"apache/skywalking","slug":"lal-rule-declares-inputtype-but-the-clas","errorCode":null,"errorMessage":"LAL rule '{}' declares inputType '{}' but the class was not found.","messagePattern":"LAL rule '(.+?)' declares inputType '(.+?)' but the class was not found\\.","errorType":"exception","errorClass":"ModuleStartException","httpStatus":null,"severity":"critical","filePath":"oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/provider/log/listener/LogFilterListener.java","lineNumber":490,"sourceCode":"                return;\n            }\n            throw new IllegalStateException(\n                \"LALSourceTypeProvider \" + provider.getClass().getName() + \" for layer \"\n                    + provider.layer() + \" declared inputType \" + inputType.getName()\n                    + \" — LAL accepts only LogData / LogData.Builder (default agent path), \"\n                    + \"a protobuf Message subclass, or a type implementing \"\n                    + ToJson.class.getName() + \". Update the provider's inputType() or \"\n                    + \"implement ToJson on \" + inputType.getName() + \".\");\n        }\n\n        private static Class<?> resolveInputType(final LALConfig config,\n                                                  final LALSourceTypeProvider spiProvider) throws ModuleStartException {\n            final String yamlType = config.getInputType();\n            if (yamlType != null && !yamlType.isEmpty()) {\n                try {\n                    return Class.forName(yamlType);\n                } catch (ClassNotFoundException e) {\n                    throw new ModuleStartException(\n                        \"LAL rule '\" + config.getName() + \"' declares inputType '\"\n                            + yamlType + \"' but the class was not found.\", e);\n                }\n            }\n            return spiProvider != null ? spiProvider.inputType() : null;\n        }\n\n        /**\n         * Short name → implementation class map built from {@link ServiceLoader}{@code <LALOutputBuilder>}.\n         * Populated once on first call to {@link #resolveOutputType}.\n         */\n        private static volatile Map<String, Class<?>> OUTPUT_BUILDER_NAMES;\n\n        private static Map<String, Class<?>> loadOutputBuilderNames() {\n            if (OUTPUT_BUILDER_NAMES != null) {\n                return OUTPUT_BUILDER_NAMES;\n            }\n            synchronized (Factory.class) {","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/provider/log/listener/LogFilterListener.java#L472-L508","documentation":"Thrown when a LAL rule's YAML declares inputType: <FQCN> and Class.forName() cannot load that class. The class must be on the OAP server classpath at rule-compile time, because the compiler reflects over it to generate typed parsed.* getter calls. Reported as ModuleStartException with rule name and the offending class name.","triggerScenarios":"Typo in the FQCN; class lives in an agent/probe jar not shipped with OAP; a receiver plugin providing the type is not enabled/present; version skew where the class moved or was renamed between releases.","commonSituations":"Writing inputType: io.envoyproxy... with wrong package casing; referencing a custom DTO whose jar was not added to oap-libs; upgrading Envoy/OTel protos where generated classes relocated.","solutions":["Correct the FQCN — copy it from the class's actual package (mind protobuf generated-code nesting)","Ship the jar containing the class into the OAP classpath (oap-libs/ for the dist)","If the type comes from a receiver plugin, verify that receiver module is enabled and loaded before log-analyzer compiles rules","Drop inputType: to fall back to the SPI default or LogMetadata"],"exampleFix":"# before\ninputType: io.envoyproxy.envoy.data.accesslog.v3.HTTPAccessLogEntry2\n\n# after\ninputType: io.envoyproxy.envoy.data.accesslog.v3.HTTPAccessLogEntry","handlingStrategy":"validation","validationCode":"// Pre-deploy: resolve every declared inputType the way the loader will:\ntry {\n    Class.forName(declaredInputType);\n} catch (ClassNotFoundException e) {\n    // fix the FQCN or ship the jar before enabling the rule\n}","typeGuard":null,"tryCatchPattern":"try {\n    Class<?> t = Class.forName(yamlType);\n} catch (ClassNotFoundException e) {\n    // names rule + class; correct the YAML or add the dependency, then restart\n}","preventionTips":["Copy FQCNs from javap/IDE, not from memory or docs prose","Ensure the jar containing the input class is in oap-libs of the same deployment","Prefer layer SPI defaults over hand-typed FQCNs where possible"],"tags":["lal","log-analyzer","input-type","classpath","startup"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}