apache/skywalking · critical · ModuleStartException
LAL rule '{}' declares inputType '{}' but the class was not
Error message
LAL rule '{}' declares inputType '{}' but the class was not found. What it means
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.
Source
Thrown at oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/provider/log/listener/LogFilterListener.java:490
return;
}
throw new IllegalStateException(
"LALSourceTypeProvider " + provider.getClass().getName() + " for layer "
+ provider.layer() + " declared inputType " + inputType.getName()
+ " — LAL accepts only LogData / LogData.Builder (default agent path), "
+ "a protobuf Message subclass, or a type implementing "
+ ToJson.class.getName() + ". Update the provider's inputType() or "
+ "implement ToJson on " + inputType.getName() + ".");
}
private static Class<?> resolveInputType(final LALConfig config,
final LALSourceTypeProvider spiProvider) throws ModuleStartException {
final String yamlType = config.getInputType();
if (yamlType != null && !yamlType.isEmpty()) {
try {
return Class.forName(yamlType);
} catch (ClassNotFoundException e) {
throw new ModuleStartException(
"LAL rule '" + config.getName() + "' declares inputType '"
+ yamlType + "' but the class was not found.", e);
}
}
return spiProvider != null ? spiProvider.inputType() : null;
}
/**
* Short name → implementation class map built from {@link ServiceLoader}{@code <LALOutputBuilder>}.
* Populated once on first call to {@link #resolveOutputType}.
*/
private static volatile Map<String, Class<?>> OUTPUT_BUILDER_NAMES;
private static Map<String, Class<?>> loadOutputBuilderNames() {
if (OUTPUT_BUILDER_NAMES != null) {
return OUTPUT_BUILDER_NAMES;
}
synchronized (Factory.class) {View on GitHub (pinned to 102af09b4a)
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
Example fix
# before inputType: io.envoyproxy.envoy.data.accesslog.v3.HTTPAccessLogEntry2 # after inputType: io.envoyproxy.envoy.data.accesslog.v3.HTTPAccessLogEntry
Defensive patterns
Strategy: validation
Validate before calling
// Pre-deploy: resolve every declared inputType the way the loader will:
try {
Class.forName(declaredInputType);
} catch (ClassNotFoundException e) {
// fix the FQCN or ship the jar before enabling the rule
} Try / catch
try {
Class<?> t = Class.forName(yamlType);
} catch (ClassNotFoundException e) {
// names rule + class; correct the YAML or add the dependency, then restart
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to compile LAL expression: {dsl}
- Failed to load LAL config rules
- LAL rule {ruleName} layerDefinitions entry rejected: {def}
- Failed to create LAL listener factory.
- Failed to load static LAL rules.
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/1d308aa50fef23c8.
Report an issue: GitHub.