You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "dubu (via GitHub)" <gi...@apache.org> on 2025/06/13 08:10:31 UTC

[I] example code is not working. SPI-00001: No implementation type 'JDBC' [shardingsphere]

dubu opened a new issue, #35694:
URL: https://github.com/apache/shardingsphere/issues/35694

   ## Description
   
   When I use the following configuration in my `config.yaml`:
   
   ```yaml
   mode:
     type: Standalone
     repository:
       type: JDBC
   ```
   
   I get the following error at runtime:
   
   ```
   Caused by: org.apache.shardingsphere.infra.spi.exception.ServiceProviderNotFoundException: SPI-00001: No implementation class load from SPI 'org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository' with type 'JDBC'.
   ```
   
   ## Steps to Reproduce
   
   1. Generate code using the template:  
      [`Configuration.ftl` (Line 101)](https://github.com/apache/shardingsphere/blob/a4b557d4e484cca7e17e4cd4d905cc66df0b4c00/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/java/config/Configuration.ftl#L101)
   2. Use the generated config (`sharding--spring-boot-starter-jdbc--standalone--local`) as shown above.
   3. Start the application.
   
   ## Expected Behavior
   
   - The application should start successfully if the configuration is valid.
   - Or, if `JDBC` is not supported, this should be clearly documented or the template should not generate such configuration.
   
   ## Actual Behavior
   
   - The application fails to start with the above SPI exception.
   
   ## Additional Information
   
   - [Link to the relevant code in Configuration.ftl](https://github.com/apache/shardingsphere/blob/a4b557d4e484cca7e17e4cd4d905cc66df0b4c00/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/java/config/Configuration.ftl#L101)
   - Version: (Please specify your ShardingSphere version)
   
   ## Suggestion
   
   - Please clarify if `mode.repository.type: JDBC` is supported.
   - If not supported, update the documentation and templates to avoid generating unsupported configurations.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] example code is not working. SPI-00001: No implementation type 'JDBC' [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #35694: example code is not working. SPI-00001: No implementation  type 'JDBC'
URL: https://github.com/apache/shardingsphere/issues/35694


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] example code is not working. SPI-00001: No implementation type 'JDBC' [shardingsphere]

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #35694:
URL: https://github.com/apache/shardingsphere/issues/35694#issuecomment-2973514104

   - It seems that this is because `org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc` has become an optional module, but this example module has not been updated to reflect the dependency on `org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc`.
   - This should be the change that occurred on the 5.5.3 milestone. Are you planning to submit a PR to modify the template file?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org