{"record":{"id":"3f1fd947f50de1fa","repo":"apache/shardingsphere","slug":"spi-1-3f1fd9","errorCode":"SPI:1","errorMessage":"No implementation class load from SPI '%s' with type '%s'.","messagePattern":"No implementation class load from SPI '(.+?)' with type '(.+?)'\\.","errorType":"exception","errorClass":"ServiceProviderNotFoundException","httpStatus":null,"severity":"error","filePath":"jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/driver/ShardingSphereURLLoadEngine.java","lineNumber":57,"sourceCode":"    private final ShardingSphereURL url;\n    \n    /**\n     * Load configuration content.\n     *\n     * @return loaded content\n     * @throws ServiceProviderNotFoundException service provider not found exception\n     */\n    public Object loadContent() {\n        Optional<ShardingSphereLocalFileURLLoader> localFileURLLoader = TypedSPILoader.findService(ShardingSphereLocalFileURLLoader.class, url.getSourceType());\n        if (localFileURLLoader.isPresent()) {\n            Collection<String> lines = Arrays.asList(localFileURLLoader.get().load(url.getConfigurationSubject(), url.getQueryProps()).split(System.lineSeparator()));\n            return URLArgumentLineRender.render(lines, URLArgumentPlaceholderTypeFactory.valueOf(url.getQueryProps()));\n        }\n        Optional<ShardingSphereModeConfigurationURLLoader> modeConfigURLLoader = TypedSPILoader.findService(ShardingSphereModeConfigurationURLLoader.class, url.getSourceType());\n        if (modeConfigURLLoader.isPresent()) {\n            return modeConfigURLLoader.get().load(url.getConfigurationSubject(), url.getQueryProps());\n        }\n        throw new ServiceProviderNotFoundException(ShardingSphereModeConfigurationURLLoader.class, url.getSourceType());\n    }\n}\n","sourceCodeStart":39,"sourceCodeEnd":60,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/driver/ShardingSphereURLLoadEngine.java#L39-L60","documentation":"ServiceProviderNotFoundException (error code family 'SPI') thrown by ShardingSphereURLLoadEngine.loadContent when the JDBC URL's source type matches neither a ShardingSphereLocalFileURLLoader nor a ShardingSphereModeConfigurationURLLoader SPI implementation. The message names the SPI interface and the requested type; code SPI:1 marks it as an extension-point resolution failure.","triggerScenarios":"Using a jdbc:shardingsphere:... URL whose scheme/type segment (e.g. 'classpath:...', 'apollo:...', 'etcd:...') has no matching SPI loader on the classpath — unsupported type string, typo, or the optional module providing that loader is missing.","commonSituations":"Typo in the URL type prefix; upgrading to 5.x URL format (jdbc:shardingsphere:classpath:... vs the old absolute-path style) without the right modules; using a mode-config source (zookeeper/etcd) without including the corresponding mode-artifact dependency; custom URL loaders not registered via ServiceLoader.","solutions":["Correct the URL to a supported form, e.g. jdbc:shardingsphere:classpath:config.yaml or jdbc:shardingsphere:absolutepath:/etc/ss/config.yaml.","Add the dependency that provides the needed loader (e.g. shardingsphere-cluster-mode-repository-etcd/zookeeper for mode-backed URLs).","If the URL type is custom, implement the SPI and register it via META-INF/services.","Verify the driver version supports the URL type you use (check docs for your release)."],"exampleFix":"# before\njdbc:shardingsphere:zookeeper:127.0.0.1:2181 # without mode-repository dependency\n# after\n# add shardingsphere-cluster-mode-repository-zookeeper, keep URL\njdbc:shardingsphere:classpath:sharding.yaml","handlingStrategy":"validation","validationCode":"// validate URL prefix before connecting\nif (!url.matches(\"jdbc:shardingsphere:(classpath|absolutepath|file|jdbc|apollo|zookeeper|etcd)[:].+\")) throw new IllegalArgumentException(url);","typeGuard":null,"tryCatchPattern":"catch (ServiceProviderNotFoundException ex) { fail configuration startup with URL and supported types in message; }","preventionTips":["Use documented URL forms for your driver version","Add mode-repository dependencies for cluster mode URLs","Test URL loading at startup so config errors fail fast"],"tags":["jdbc","url","spi","configuration"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}