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

ManagementStreamProcessor.create() reflectively instantiates the StorageBuilder for a @Stream-annotated ManagementData class and asks the storage plugin's StorageDAO for an IManagementDAO. Any reflection failure — builder class has no no-arg constructor, the constructor threw, the class is abstract, or access was denied — surfaces as this UnexpectedException wrapping the cause.

Source

Thrown at oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/ManagementStreamProcessor.java:76

    public void in(final ManagementData managementData) {
        final ManagementPersistentWorker worker = workers.get(managementData.getClass());
        if (worker != null) {
            worker.in(managementData);
        }
    }

    public void create(final ModuleDefineHolder moduleDefineHolder, final Stream stream, final Class<? extends ManagementData> 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);
        IManagementDAO managementDAO;
        try {
            managementDAO = storageDAO.newManagementDao(builder.getDeclaredConstructor().newInstance());
        } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
            throw new UnexpectedException("Create " + stream.builder()
                    .getSimpleName() + " none stream record DAO failure.", e);
        }

        ModelRegistry modelSetter = moduleDefineHolder.find(CoreModule.NAME).provider().getService(ModelRegistry.class);
        // Management 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.None),
            StorageManipulationOpt.schemaCreateIfAbsent());

        final ManagementPersistentWorker persistentWorker = new ManagementPersistentWorker(moduleDefineHolder, model, managementDAO);
        workers.put(streamClass, persistentWorker);
    }
}

View on GitHub (pinned to 102af09b4a)

Solutions

  1. Inspect the wrapped cause in the stack trace — NoSuchMethodException means 'add public no-arg constructor to the builder', InstantiationException means 'abstract/interface builder', InvocationTargetException means 'constructor threw'
  2. Ensure the StorageBuilder subclass referenced in @Stream(builder=...) is public, concrete, and has a public no-arg constructor
  3. Rebuild the custom plugin against the exact OAP server-core version in use and check for jar conflicts in oap-libs/

Example fix

// before
public static class MyManagementBuilder implements StorageBuilder {
    public MyManagementBuilder(Map<String, Object> ignored) {}
}
// after
public static class MyManagementBuilder implements StorageBuilder {
    public MyManagementBuilder() {}
}
Defensive patterns

Strategy: try-catch

Validate before calling

// fail early in tests: builder must be reflectively instantiable
Constructor<?> c = MyManagementData.MyBuilder.class.getDeclaredConstructor();
assert Modifier.isPublic(c.getModifiers()) && !Modifier.isAbstract(MyManagementData.MyBuilder.class.getModifiers());

Try / catch

Let the startup UnexpectedException fail fast; in test harnesses, catch UnexpectedException around ManagementStreamProcessor.create() and assert the cause chain points at the builder class.

Prevention

When it happens

Trigger: Registering a custom ManagementData stream whose builder lacks a public no-arg constructor; a storage plugin (BanyanDB/ES/JDBC...) whose newManagementDao() path cannot instantiate; mixing an incompatible custom storage extension with the current OAP version.

Common situations: Writing a custom OAL extension or plugin and forgetting the builder's public constructor; deploying a storage-plugin jar compiled against a different server-core API; classpath duplication where the wrong builder class is loaded.

Related errors


AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14). Data as JSON: /api/errors/e9bb60fea4327377. Report an issue: GitHub.