RaigorJiang opened a new issue #10545:
URL: https://github.com/apache/shardingsphere/issues/10545


   For #10455
   
   The `shadow-example` module test issue
   
   - shadow-raw-jdbc-example
     1. some schems  are not defined in `nanual_schema.sql`:
   
        shadow_demo_ds_0, shadow_demo_ds_1, demo_shadow_write_ds
     
     2. `ShardingType` in `DataSourceFactory` and `YamlDataSourceFactory` not 
match.
     
   - shadow-spring-boot-example
     1. `readwrite-splitting-shadow-databases`  
         shadow rule configuration error
        
     2. `sharding-shadow-databases` 
        shadow rule configuration error
     
     3. `encrypt-shadow-databases`
        shadow rule configuration error, and An exception occurs:
        
        ```
        Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'pwd_encryptor': Error setting property values; 
nested exception is org.springframework.beans.NotWritablePropertyException: 
Invalid property 'props' of bean class 
[org.apache.shardingsphere.example.fixture.TestQueryAssistedShardingEncryptAlgorithm]:
 Bean property 'props' is not writable or has an invalid setter method. Does 
the parameter type of the setter match the return type of the getter?
                at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1571)
        ```
     
   - `shadow-spring-namespace-example`
     
      1. test with `application-encrypt-shadow-databases.xml` got exception:
   ```
   Exception in thread "main" org.mybatis.spring.MyBatisSystemException: nested 
exception is org.apache.ibatis.exceptions.PersistenceException: 
   ### Error querying database.  Cause: java.lang.IndexOutOfBoundsException: 
Index: 0, Size: 0
   ### The error may exist in file 
[E:\gitee\shardingsphere\examples\example-core\example-spring-mybatis\target\classes\META-INF\mappers\ShadowUserMapper.xml]
   ### The error may involve 
org.apache.shardingsphere.example.core.mybatis.repository.MybatisShadowUserRepository.selectAllByShadow
   ### The error occurred while handling results
   ### SQL: SELECT * FROM t_user WHERE shadow = ?;
   ### Cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at 
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:79)
        at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
        at com.sun.proxy.$Proxy117.selectList(Unknown Source)
        at 
org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:231)
        at 
org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
        at com.sun.proxy.$Proxy124.selectAllByShadow(Unknown Source)
        at 
org.apache.shardingsphere.example.core.mybatis.repository.MybatisShadowUserRepository.selectAll(MybatisShadowUserRepository.java:34)
        at 
java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
        at 
org.apache.ibatis.binding.MapperProxy.invokeDefaultMethod(MapperProxy.java:81)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
        at com.sun.proxy.$Proxy124.selectAll(Unknown Source)
        at 
org.apache.shardingsphere.example.core.mybatis.service.ShadowUserServiceImpl.printData(ShadowUserServiceImpl.java:90)
        at 
org.apache.shardingsphere.example.core.mybatis.service.ShadowUserServiceImpl.processSuccess(ShadowUserServiceImpl.java:51)
        at 
org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate.run(ExampleExecuteTemplate.java:29)
        at 
org.apache.shardingsphere.example.shadow.table.spring.namespace.ExampleMain.main(ExampleMain.java:36)
   ```
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to