{"record":{"id":"d7ecd3413b1ecde0","repo":"apache/skywalking","slug":"failed-to-create-lal-listener-factory","errorCode":null,"errorMessage":"Failed to create LAL listener factory.","messagePattern":"Failed to create LAL listener factory\\.","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/LogAnalyzerModuleProvider.java","lineNumber":134,"sourceCode":"    @Override\n    public void prepare() throws ServiceNotProvidedException, ModuleStartException {\n        logAnalyzerService = new LogAnalyzerServiceImpl(getManager(), moduleConfig);\n        this.registerServiceImplementation(ILogAnalyzerService.class, logAnalyzerService);\n\n        // Register both module-declared services in prepare(): {@link BootstrapFlow#start}\n        // runs {@code requiredCheck} against {@code services()} BEFORE this provider's\n        // {@code start()}, and the count-equals check ({@code requiredServices.length ==\n        // services.size()}) requires every declared service to be registered already.\n        // Both objects are config-only at construction — the Factory's heavy\n        // rule-compile pass is deferred to {@link LogFilterListener.Factory#loadStaticRules}\n        // (called from {@link #start()} where moduleManager.find is allowed); the\n        // MalConverterRegistry is a pure delegate to this provider's own volatile map and\n        // never reaches across modules.\n        try {\n            this.factory = new LogFilterListener.Factory(getManager(), moduleConfig);\n            this.registerServiceImplementation(LogFilterListener.Factory.class, this.factory);\n        } catch (final Exception e) {\n            throw new ModuleStartException(\"Failed to create LAL listener factory.\", e);\n        }\n        // MalConverterRegistry for the log-mal-rules catalog. The runtime-rule plugin looks\n        // this up by module name + service class, so it does not need a compile-time dep on\n        // log-analyzer's concrete provider. Delegates directly to this provider's volatile\n        // map so ingest code (MetricExtractor) and runtime mutations share exactly one state.\n        this.registerServiceImplementation(MalConverterRegistry.class, new MalConverterRegistry() {\n            @Override\n            public void addOrReplaceConverter(final String key, final MetricConvert convert) {\n                addOrReplaceMetricConvert(key, convert);\n            }\n\n            @Override\n            public void removeConverter(final String key) {\n                removeMetricConvert(key);\n            }\n        });\n    }\n","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/provider/LogAnalyzerModuleProvider.java#L116-L152","documentation":"Wrapper thrown in LogAnalyzerModuleProvider.prepare() when constructing LogFilterListener.Factory fails. The Factory itself is config-only at construction (heavy rule compilation is deferred to loadStaticRules in start()), so a failure here indicates constructor-level problems: config object issues or unexpected exceptions during initial wiring. It aborts module preparation, so the OAP does not start.","triggerScenarios":"Any exception thrown from new LogFilterListener.Factory(getManager(), moduleConfig) — null config fields, class-level initialization failures in referenced classes; in practice rare, since the heavy path is deferred.","commonSituations":"A corrupted/incomplete log-analyzer configuration object; classpath conflicts where factory-related classes fail static init; a custom build missing a dependency of the v2 analyzer.","solutions":["Inspect the nested cause — it carries the actual construction failure","Validate the full log-analyzer section of application.yml (lalPath, lalFiles, malPath, malFiles)","Check for NoClassDefFoundError / static-init causes indicating classpath or packaging problems","Rebuild/redeploy the distribution if a jar was partially updated"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    this.factory = new LogFilterListener.Factory(getManager(), moduleConfig);\n} catch (Exception e) {\n    throw new ModuleStartException(\"Failed to create LAL listener factory.\", e);\n    // operator action: inspect cause; constructor failures are config/classpath level\n}","preventionTips":["Validate the log-analyzer config section before boot","Keep the deployment's jars consistent (no partial oap-libs updates)","Treat static-init errors in the cause chain as classpath issues first"],"tags":["lal","log-analyzer","startup","wrapper"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}