hansva opened a new issue, #9540: URL: https://github.com/apache/hop/issues/9540
### Apache Hop version? 2.20.0 ### Java version? 21 ### Operating system Other ### What happened? `SerializableMetadataProvider(String json)` reads the metadata that remote execution, Hop Server and the distributed engines send along with a run, and that metadata exports contain. When one object of an installed metadata type can't be built in the reading JVM, `loadJsonObject()` throws, and the whole provider fails. Every pipeline or workflow that needs that metadata fails, even when it never uses the object that couldn't be built. An object fails to build when it refers to a plugin the reading Hop doesn't have. For example: - a pipeline run configuration for an engine that isn't installed there (`PipelineRunConfigurationMetadataObjectFactory` throws "Unable to find the plugin … for id"); - a database connection, variable resolver or execution information location whose plugin isn't installed. #9525 already handles a metadata *type* that isn't installed. This is the same situation one level down: a single *object* of an installed type. A smaller, related point: for a non-empty array of a type that isn't installed, `getManagedClass()` still logs `Error loading class …` with a full stack trace on every load, although the objects are then skipped as intended. ### Proposed fix 1. Read each object of a type on its own (`readTree()`), then build it from that tree. When building fails, log one line naming the object and the type, and leave that object out. Because the tree has already been read, the parser continues at the next object whatever went wrong. This matches what the copy from another metadata provider already does. 2. Before resolving a type's class, check whether a plugin provides its key (including legacy keys). A type that isn't installed gets one log line without a stack trace. A type that is installed but fails to load still logs its error. ### Tests - An export with an object whose plugin isn't installed, between two objects that are: the other two load, and the provider is created. - A non-empty array of a type that isn't installed: skipped, with one log line and no stack trace. ### Issue Priority Priority: 2 ### Issue Component Component: API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
