harvies opened a new issue #175: Example 'sharding-proxy-boot-mybatis-example' 
can't run.
URL: https://github.com/apache/incubator-shardingsphere-example/issues/175
 
 
   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/incubator-shardingsphere-example/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response **more than 7 days** and we cannot reproduce it on current 
information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   4.0.0-RC3-SNAPSHOT
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-Proxy
   ### Expected behavior
   
   ### Actual behavior
   
   ### Reason analyze (If you can)
   1.The configuration '<mapper 
resource="META-INF/mappers/AddressMapper.xml"/>' is missing in 
mybatis-config.xml.
   2.The broadcast table 't_address' is not configured in 
'config-sharding.yaml'.
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   run 
'org.apache.shardingsphere.example.proxy.spring.boot.mybatis.SpringBootStarterExample'
   ### Example codes for reproduce this issue (such as a github link).
   Exception in thread "main" org.apache.ibatis.binding.BindingException: 
Invalid bound statement (not found): 
org.apache.shardingsphere.example.core.mybatis.repository.MybatisAddressRepository.createTableIfNotExists
        at 
org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:230)
        at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
        at 
org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)
        at com.sun.proxy.$Proxy50.createTableIfNotExists(Unknown Source)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl.initAddressTable(OrderServiceImpl.java:59)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl.initEnvironment(OrderServiceImpl.java:55)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl$$FastClassBySpringCGLIB$$bc37129f.invoke(<generated>)
        at 
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:667)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl$$EnhancerBySpringCGLIB$$da7696e9.initEnvironment(<generated>)
        at 
org.apache.shardingsphere.example.proxy.spring.boot.mybatis.SpringBootStarterExample.process(SpringBootStarterExample.java:48)
        at 
org.apache.shardingsphere.example.proxy.spring.boot.mybatis.SpringBootStarterExample.main(SpringBootStarterExample.java:42)
   
   
   
   
   
   Exception in thread "main" 
org.springframework.jdbc.UncategorizedSQLException: 
   ### Error updating database.  Cause: java.sql.SQLException: 2Unknown 
exception: [Cannot find table rule and default data source with logic table: 
't_address']
   ### The error may involve defaultParameterMap
   ### The error occurred while setting parameters
   ### SQL: CREATE TABLE IF NOT EXISTS t_address (address_id BIGINT NOT NULL, 
address_name VARCHAR(100) NOT NULL, PRIMARY KEY (address_id));
   ### Cause: java.sql.SQLException: 2Unknown exception: [Cannot find table 
rule and default data source with logic table: 't_address']
   ; uncategorized SQLException for SQL []; SQL state [C1000]; error code 
[10002]; 2Unknown exception: [Cannot find table rule and default data source 
with logic table: 't_address']; nested exception is java.sql.SQLException: 
2Unknown exception: [Cannot find table rule and default data source with logic 
table: 't_address']
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:90)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
        at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
        at 
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
        at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
        at com.sun.proxy.$Proxy46.update(Unknown Source)
        at 
org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:295)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
        at com.sun.proxy.$Proxy50.createTableIfNotExists(Unknown Source)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl.initAddressTable(OrderServiceImpl.java:59)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl.initEnvironment(OrderServiceImpl.java:55)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl$$FastClassBySpringCGLIB$$bc37129f.invoke(<generated>)
        at 
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:667)
        at 
org.apache.shardingsphere.example.core.mybatis.service.OrderServiceImpl$$EnhancerBySpringCGLIB$$2585457a.initEnvironment(<generated>)
        at 
org.apache.shardingsphere.example.proxy.spring.boot.mybatis.SpringBootStarterExample.process(SpringBootStarterExample.java:48)
        at 
org.apache.shardingsphere.example.proxy.spring.boot.mybatis.SpringBootStarterExample.main(SpringBootStarterExample.java:42)
   Caused by: java.sql.SQLException: 2Unknown exception: [Cannot find table 
rule and default data source with logic table: 't_address']
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
        at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
        at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
        at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
        at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
        at 
org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)
        at 
org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
        at 
org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
        at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
        at 
org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
        at 
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434)
        ... 13 more
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to