apache/skywalking · critical · UnexpectedException
Create {stream.builder().getSimpleName()} none stream record
Error message
Create {stream.builder().getSimpleName()} none stream record DAO failure. What it means
NoneStreamProcessor.create() reflectively instantiates the StorageBuilder of a @Stream NoneStream class and requests an INoneStreamDAO from the storage plugin. Reflection failures (no public no-arg constructor, abstract builder, throwing constructor, access failure) are wrapped in this UnexpectedException during OAP boot.
Source
Thrown at oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/NoneStreamProcessor.java:75
public void in(NoneStream noneStream) {
final NoneStreamPersistentWorker worker = workers.get(noneStream.getClass());
if (worker != null) {
worker.in(noneStream);
}
}
public void create(ModuleDefineHolder moduleDefineHolder, Stream stream, Class<? extends NoneStream> streamClass) throws StorageException {
final StorageBuilderFactory storageBuilderFactory = moduleDefineHolder.find(StorageModule.NAME)
.provider()
.getService(StorageBuilderFactory.class);
final Class<? extends StorageBuilder> builder = storageBuilderFactory.builderOf(streamClass, stream.builder());
StorageDAO storageDAO = moduleDefineHolder.find(StorageModule.NAME).provider().getService(StorageDAO.class);
INoneStreamDAO noneStream;
try {
noneStream = storageDAO.newNoneStreamDao(builder.getDeclaredConstructor().newInstance());
} catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) {
throw new UnexpectedException("Create " + stream.builder()
.getSimpleName() + " none stream record DAO failure.", e);
}
ModelRegistry modelSetter = moduleDefineHolder.find(CoreModule.NAME).provider().getService(ModelRegistry.class);
// None stream doesn't read data from database during the persistent process. Keep the timeRelativeID == false always.
Model model = modelSetter.add(streamClass, stream.scopeId(),
new Storage(stream.name(), false, DownSampling.Minute),
StorageManipulationOpt.schemaCreateIfAbsent());
final NoneStreamPersistentWorker persistentWorker = new NoneStreamPersistentWorker(moduleDefineHolder, model, noneStream);
workers.put(streamClass, persistentWorker);
}
}
View on GitHub (pinned to 102af09b4a)
Solutions
- Check the wrapped cause: NoSuchMethodException -> add a public no-arg constructor to the builder named in @Stream
- Ensure the builder class is public, concrete, and implements StorageBuilder with the required methods
- Rebuild custom plugins against the running OAP version and verify the distribution's oap-libs has exactly one version of each jar
Example fix
// before
public static class NoneStreamBuilder {
protected NoneStreamBuilder() {}
}
// after
public static class NoneStreamBuilder implements StorageBuilder {
public NoneStreamBuilder() {}
} Defensive patterns
Strategy: try-catch
Validate before calling
Constructor<?> ctor = MyNoneStream.Builder.class.getDeclaredConstructor(); assertNotNull(ctor); assert Modifier.isPublic(ctor.getModifiers());
Try / catch
Fail fast at startup; in tests catch UnexpectedException and inspect getCause() to distinguish constructor-missing vs constructor-threw.
Prevention
- Copy the builder pattern verbatim from an existing NoneStream class in the codebase
- Run 'mvnw clean install' after upgrading before deploying custom plugins
- Check oap-libs for duplicate/conflicting plugin jars after manual installs
When it happens
Trigger: A custom NoneStream data class declares a StorageBuilder that is non-public, abstract, or lacks a no-arg constructor; a storage plugin jar incompatible with the current core API fails instantiation.
Common situations: Extending OAP with custom none-stream data (e.g. metadata records) and misconfiguring the builder; upgrading OAP without rebuilding a custom plugin; classpath conflicts between two versions of a plugin.
Related errors
- Create {stream.builder().getSimpleName()} none stream record
- Create {stream.getBuilder().getSimpleName()} metrics DAO fai
- Create {stream.builder().getSimpleName()} record DAO failure
- Create {stream.builder().getSimpleName()} top n record DAO f
- Metric TTL should be at least 2 days, current value is {}
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/e70c6b7883db7396.
Report an issue: GitHub.