{"record":{"id":"e70c6b7883db7396","repo":"apache/skywalking","slug":"create-stream-builder-getsimplename-none-str-e70c6b","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/NoneStreamProcessor.java","lineNumber":75,"sourceCode":"    public void in(NoneStream noneStream) {\n        final NoneStreamPersistentWorker worker = workers.get(noneStream.getClass());\n        if (worker != null) {\n            worker.in(noneStream);\n        }\n    }\n\n    public void create(ModuleDefineHolder moduleDefineHolder, Stream stream, Class<? extends NoneStream> 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        INoneStreamDAO noneStream;\n        try {\n            noneStream = storageDAO.newNoneStreamDao(builder.getDeclaredConstructor().newInstance());\n        } catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException 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        // None 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.Minute),\n            StorageManipulationOpt.schemaCreateIfAbsent());\n\n        final NoneStreamPersistentWorker persistentWorker = new NoneStreamPersistentWorker(moduleDefineHolder, model, noneStream);\n        workers.put(streamClass, persistentWorker);\n    }\n}\n","sourceCodeStart":57,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/NoneStreamProcessor.java#L57-L89","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\npublic static class NoneStreamBuilder {\n    protected NoneStreamBuilder() {}\n}\n// after\npublic static class NoneStreamBuilder implements StorageBuilder {\n    public NoneStreamBuilder() {}\n}","handlingStrategy":"try-catch","validationCode":"Constructor<?> ctor = MyNoneStream.Builder.class.getDeclaredConstructor();\nassertNotNull(ctor);\nassert Modifier.isPublic(ctor.getModifiers());","typeGuard":null,"tryCatchPattern":"Fail fast at startup; in tests catch UnexpectedException and inspect getCause() to distinguish constructor-missing vs constructor-threw.","preventionTips":["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"],"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"}