{"record":{"id":"e9bb60fea4327377","repo":"apache/skywalking","slug":"create-stream-builder-getsimplename-none-str","errorCode":null,"errorMessage":"Create {stream.builder().getSimpleName()} none stream record DAO failure.","messagePattern":"Create (.+?) none stream record DAO failure\\.","errorType":"exception","errorClass":"UnexpectedException","httpStatus":null,"severity":"critical","filePath":"oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/ManagementStreamProcessor.java","lineNumber":76,"sourceCode":"    public void in(final ManagementData managementData) {\n        final ManagementPersistentWorker worker = workers.get(managementData.getClass());\n        if (worker != null) {\n            worker.in(managementData);\n        }\n    }\n\n    public void create(final ModuleDefineHolder moduleDefineHolder, final Stream stream, final Class<? extends ManagementData> streamClass) throws StorageException {\n        final StorageBuilderFactory storageBuilderFactory = moduleDefineHolder.find(StorageModule.NAME)\n                                                                              .provider()\n                                                                              .getService(StorageBuilderFactory.class);\n        final Class<? extends StorageBuilder> builder = storageBuilderFactory.builderOf(streamClass, stream.builder());\n\n        StorageDAO storageDAO = moduleDefineHolder.find(StorageModule.NAME).provider().getService(StorageDAO.class);\n        IManagementDAO managementDAO;\n        try {\n            managementDAO = storageDAO.newManagementDao(builder.getDeclaredConstructor().newInstance());\n        } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n            throw new UnexpectedException(\"Create \" + stream.builder()\n                    .getSimpleName() + \" none stream record DAO failure.\", e);\n        }\n\n        ModelRegistry modelSetter = moduleDefineHolder.find(CoreModule.NAME).provider().getService(ModelRegistry.class);\n        // Management stream doesn't read data from database during the persistent process. Keep the timeRelativeID == false always.\n        Model model = modelSetter.add(streamClass, stream.scopeId(),\n            new Storage(stream.name(), false, DownSampling.None),\n            StorageManipulationOpt.schemaCreateIfAbsent());\n\n        final ManagementPersistentWorker persistentWorker = new ManagementPersistentWorker(moduleDefineHolder, model, managementDAO);\n        workers.put(streamClass, persistentWorker);\n    }\n}\n","sourceCodeStart":58,"sourceCodeEnd":90,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/ManagementStreamProcessor.java#L58-L90","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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'","Ensure the StorageBuilder subclass referenced in @Stream(builder=...) is public, concrete, and has a public no-arg constructor","Rebuild the custom plugin against the exact OAP server-core version in use and check for jar conflicts in oap-libs/"],"exampleFix":"// before\npublic static class MyManagementBuilder implements StorageBuilder {\n    public MyManagementBuilder(Map<String, Object> ignored) {}\n}\n// after\npublic static class MyManagementBuilder implements StorageBuilder {\n    public MyManagementBuilder() {}\n}","handlingStrategy":"try-catch","validationCode":"// fail early in tests: builder must be reflectively instantiable\nConstructor<?> c = MyManagementData.MyBuilder.class.getDeclaredConstructor();\nassert Modifier.isPublic(c.getModifiers()) && !Modifier.isAbstract(MyManagementData.MyBuilder.class.getModifiers());","typeGuard":null,"tryCatchPattern":"Let the startup UnexpectedException fail fast; in test harnesses, catch UnexpectedException around ManagementStreamProcessor.create() and assert the cause chain points at the builder class.","preventionTips":["Always give StorageBuilder implementations an explicit public no-arg constructor","Add a reflection smoke test for every custom @Stream builder in your plugin's test suite","Build plugins against the exact OAP version you deploy; keep one version per jar in oap-libs"],"tags":["stream-processor","storage","reflection","startup","plugin"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}