添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only when i use save to add ,then:
2019-03-30 09:54:23.490 WARN 4000 --- [nio-8080-exec-1] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction
2019-03-30 09:54:24.013 INFO 4000 --- [nio-8080-exec-1] o.h.e.j.b.internal.AbstractBatchImpl : HHH000010: On release of batch it still contained JDBC statements

I donnot know how to deal with it?
It would be better if someone could help me.

It is likely that the primary key causes this problem.
If you don't set the primary key to increase by itself,I can insert data.
But I need the primary key to increase by itself (by uuid).

I don't know how to deal with it.

@fdlzp I have solved the problem. Your problem is caused by 2 configuration.

  • Field case, in your entity, you set field name as upper case and also set sharding configuration. But the hibernate would change it to lower case like following:
  • Terminal{id='null', cardNo='111', name='xxx', dateTime=Fri Mar 29 16:21:58 CST 2019}---2
    Hibernate: insert into terminal (card_no, date_time, name, id) values (?, ?, ?, ?)
    2019-04-01 10:37:36.993  INFO 1459 --- [nio-8080-exec-2] Sharding-JDBC-SQL                        : Logic SQL: insert into terminal (card_no, date_time, name, id) values (?, ?, ?, ?)
    2019-04-01 10:37:36.995  INFO 1459 --- [nio-8080-exec-2] Sharding-JDBC-SQL                        : SQLStatement: InsertStatement(columns=[Column(name=card_no, tableName=terminal), Column(name=date_time, tableName=terminal), Column(name=name, tableName=terminal), Column(name=id, tableName=terminal)], multipleConditions=[], columnsListLastPosition=50, generateKeyColumnIndex=-1, afterValuesPosition=59, valuesListLastPosition=70, generatedKey=null)
    2019-04-01 10:37:36.996  INFO 1459 --- [nio-8080-exec-2] Sharding-JDBC-SQL                        : Actual SQL: yytest ::: insert into yytest.TERMINAL_3 (card_no, date_time, name, id) values (?, ?, ?, ?) ::: [111, 2019-03-29 16:21:58.0, xxx, 38a8312d-800a-4039-ad8a-474e3dac7952]
    

    It will cause groovy can't find the object CARD_NO and invoke mod() method.

    this problem can be solved by change configuration like following:

    sharding.jdbc.config.sharding.tables.TERMINAL.table-strategy.inline.sharding-column=card_no
    sharding.jdbc.config.sharding.tables.TERMINAL.table-strategy.inline.algorithm-expression=system.TERMINAL_${card_no % 12}
    
  • the UUID length is 36, because of the char '-', but you ID field length is 32
  • @GeneratedValue(generator = "idGenerator") // @GenericGenerator(name = "idGenerator", strategy = "uuid") @GenericGenerator(name = "idGenerator", strategy = "org.hibernate.id.UUIDGenerator") @Column(name = "ID", nullable = false, length = 32) private String id ;

    It also cause insert exception.

    One more question.
    The same demo.(https://github.com/fdlzp/sharding-jdbc_jpa_oracle)
    Just change the version.

    When starting spring boot application with Sharding Sphere throws java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    2019-04-02 14:06:06.166 INFO 4240 --- [ restartedMain] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited
    2019-04-02 14:06:11.939 WARN 4240 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [io/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is io.shardingsphere.core.exception.ShardingException: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    2019-04-02 14:06:11.943 INFO 4240 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
    2019-04-02 14:06:11.959 INFO 4240 --- [ restartedMain] ConditionEvaluationReportLoggingListener :

    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    2019-04-02 14:06:12.021 ERROR 4240 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [io/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is io.shardingsphere.core.exception.ShardingException: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:733) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:198) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1266) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:373) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1246) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1087) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:548) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230) [spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at com.fudabd.oracletest.OracleTestApplication.main(OracleTestApplication.java:15) [classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [io/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is io.shardingsphere.core.exception.ShardingException: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:591) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1246) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:819) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:725) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    ... 33 common frames omitted
    

    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is io.shardingsphere.core.exception.ShardingException: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:583) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    ... 46 common frames omitted
    

    Caused by: io.shardingsphere.core.exception.ShardingException: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    at io.shardingsphere.core.metadata.table.executor.TableMetaDataInitializer.load(TableMetaDataInitializer.java:69) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.ShardingMetaData.<init>(ShardingMetaData.java:49) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.shardingjdbc.jdbc.core.ShardingContext.<init>(ShardingContext.java:68) ~[sharding-jdbc-core-3.1.0.jar:na]
    at io.shardingsphere.shardingjdbc.jdbc.core.datasource.ShardingDataSource.<init>(ShardingDataSource.java:59) ~[sharding-jdbc-core-3.1.0.jar:na]
    at io.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory.createDataSource(ShardingDataSourceFactory.java:51) ~[sharding-jdbc-core-3.1.0.jar:na]
    at io.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration.dataSource(SpringBootConfiguration.java:76) ~[sharding-jdbc-spring-boot-starter-3.1.0.jar:na]
    at io.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration$$EnhancerBySpringCGLIB$$16a14f09.CGLIB$dataSource$0(<generated>) ~[sharding-jdbc-spring-boot-starter-3.1.0.jar:na]
    at io.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration$$EnhancerBySpringCGLIB$$16a14f09$$FastClassBySpringCGLIB$$80e90407.invoke(<generated>) ~[sharding-jdbc-spring-boot-starter-3.1.0.jar:na]
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:365) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at io.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration$$EnhancerBySpringCGLIB$$16a14f09.dataSource(<generated>) ~[sharding-jdbc-spring-boot-starter-3.1.0.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    ... 47 common frames omitted
    

    Caused by: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:58) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:776) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:897) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1034) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3820) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3867) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1502) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at oracle.jdbc.OracleDatabaseMetaData.getTables(OracleDatabaseMetaData.java:3658) ~[ojdbc6-12.1.0.1-atlassian-hosted.jar:12.1.0.1.0]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader.isTableExist(TableMetaDataLoader.java:128) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader.load(TableMetaDataLoader.java:96) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader.access$100(TableMetaDataLoader.java:52) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader$1.execute(TableMetaDataLoader.java:86) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.executor.ShardingExecuteEngine.syncGroupExecute(ShardingExecuteEngine.java:175) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.executor.ShardingExecuteEngine.groupExecute(ShardingExecuteEngine.java:152) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.executor.ShardingExecuteEngine.groupExecute(ShardingExecuteEngine.java:130) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader.load(TableMetaDataLoader.java:79) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataLoader.load(TableMetaDataLoader.java:73) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataInitializer.loadDefaultTables(TableMetaDataInitializer.java:87) ~[sharding-core-3.1.0.jar:na]
    at io.shardingsphere.core.metadata.table.executor.TableMetaDataInitializer.load(TableMetaDataInitializer.java:67) ~[sharding-core-3.1.0.jar:na]
    ... 62 common frames omitted
    
    	<dependency>
    		<groupId>io.shardingsphere</groupId>
    		<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
    		<version>3.1.0</version>
    	</dependency>
    	<parent>
    		<groupId>org.springframework.boot</groupId>
    		<artifactId>spring-boot-starter-parent</artifactId>
    		<version>2.0.8.RELEASE</version>
    	</parent>
    

    Do you change other configuration except the pom version?

    @fdlzp I suggest that do DEBUG at TableMetaDataLoader.java:128.
    From the logs, it may be caused by special char at catalog or actualTableName.
    check what actual input at the method, please.

    @fdlzp I suggest that do DEBUG at TableMetaDataLoader.java:128.
    From the logs, it may be caused by special char at catalog or actualTableName.
    check what actual input at the method, please.

    I‘ll try

    My newest code don't user the new version (2.0.8+3.1.0) in pom.
    Can you change the version and try it again?

    Yes, I have found, I change it to (2.0.8+3.1.0) , but your problem didn't happen.

    But I found a new problem when insert data. So you need solve current problem now.

    ShardingSphere 3.x will check all table info. Can you drop these tables and retry? My environment didn't create these tables.

    There is a probability that it will create these table, If the user does not have a table.
    It ocurs three times.This may cause a problem when I insert data.

    ShardingSphere 3.x will check all table info. Can you drop these tables and retry? My environment didn't create these tables.

    There is a probability that it will create these table, If the user does not have a table.
    It ocurs three times.This may cause a problem when I insert data.

    So you can add sharding.jdbc.config.props.sql.show=true property to configuration file to get the actual SQL sharding-jdbc execute.
    Clean all tables first and then restart application, see what SQLs actual execute.

    BTW, you can add sharding.jdbc.config.props.sql.show=true property to configuration file to get the actual SQL sharding-jdbc execute.

    I’ll try it.
    What odjbc version do you use in pom and install in your local environment?

    I think the property sharding.jdbc.config.props.sql.show=true is helpful for the data-insert problem.
    But it seems no more information for error: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    I think the property sharding.jdbc.config.props.sql.show=true is helpful for the data-insert problem.
    But it seems no more information for error: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法

    sql.show can see what table ShardingSphere drop and create. If not create table SQL input, ShardingSphere would not create table by itself. So you need to check why and how these table were created. Because in my environment, I don't have these table.

    I think there are some trouble in your environment(may be database environment), because I don't find these special tables with version(1.5.9+2.0.3) too.

    All my tests is based your example code, only change configurations of database

    (https://blog.csdn.net/inber/article/details/958372).

    It may be a bug of shardingsphere3.1.0 which is unable to access the oracle datasource sometimes.

    #1809 (comment)

    It may be a bug of shardingsphere3.1.0 which is unable to access the oracle datasource sometimes.

    #1809 (comment)

    see #1933

    Hello,could you tell me the version of your oracle database?
    10.2.0.1.0 and 11.2.0.1.0 are what I’m using.

    11.2.0.3.0

    I am sorry to feedback after such a long time.
    I installed the oracle database (11.2.0.3.0 and 12.2.0.1.0).
    For 11.2.0.3.0 , still throw the error "Caused by: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法".
    For 12.2.0.1.0 , I can connect to the database successfully (version 3.0.0.M2~3.1.0).

    Howerver, there are three problem.
    1、It costs a long time to connect to the database. (version 3.0.0.M2~3.1.0)
    It takes an average of 1 hour.

    This may be caused by the sql:
    SELECT NULL AS table_cat, o.owner AS table_schem, o.object_name AS table_name, o.object_type AS table_type, NULL AS remarks FROM all_object o WHERE o.owner LIKE :1 ESC
    begin :rept := dbms_report.get_report(:report_ref, :content, :comp); end;

    I didn't go to find the deep reason.

    #1933
    Which version solves this problem? 4.x?

    I am sorry to feedback after such a long time.
    I installed the oracle database (11.2.0.3.0 and 12.2.0.1.0).
    For 11.2.0.3.0 , still throw the error "Caused by: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法".
    For 12.2.0.1.0 , I can connect to the database successfully (version 3.0.0.M2~3.1.0).

    The problem will be caused when these tmp tables created which we discuss before.
    You should try to find solution to make oracle don't create these tables when you drop tables.

    2、The same problem when execute Oracle's DQL
    refer to #2152
    Any release has solved the problem ?Or waiting for the next release?
    3、 A problem when insert data.
    I will analyze this issue later.

    Howerver, there are three problem.
    1、It costs a long time to connect to the database. (version 3.0.0.M2~3.1.0)
    It takes an average of 1 hour.

    ShardingSphere will get table metadata when start by JDBC method getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]). But for oracle, the catalog is no effect. So ShardingSphere get whole tableName in oracle (just like #1933). If there are too many tables, it will cost much time.

    Which version solves this problem? 4.x?

    see #1933 and #1951

    I am sorry to feedback after such a long time.
    I installed the oracle database (11.2.0.3.0 and 12.2.0.1.0).
    For 11.2.0.3.0 , still throw the error "Caused by: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法".
    For 12.2.0.1.0 , I can connect to the database successfully (version 3.0.0.M2~3.1.0).

    The problem will be caused when these tmp tables created which we discuss before.
    You should try to find solution to make oracle don't create these tables when you drop tables.

    What I don’t understand is
    there is no tmp table in my database
    but still has this problem.
    (I just create the table,and comment the config for droping tables.
    But I searched for ORA-01424, as the result show,the tmp table cause the problem.
    I ....

    2、The same problem when execute Oracle's DQL
    refer to #2152
    Any release has solved the problem ?Or waiting for the next release?

    fixed in next release.

    3、 A problem when insert data.
    I plan to analyze this issue later.

    It should open a new issue. Pleases do not discuss in this issue.

    I am sorry to feedback after such a long time.
    I installed the oracle database (11.2.0.3.0 and 12.2.0.1.0).
    For 11.2.0.3.0 , still throw the error "Caused by: java.sql.SQLDataException: ORA-01424: 转义符之后字符缺失或非法".
    For 12.2.0.1.0 , I can connect to the database successfully (version 3.0.0.M2~3.1.0).

    The problem will be caused when these tmp tables created which we discuss before.
    You should try to find solution to make oracle don't create these tables when you drop tables.

    What I don’t understand is
    there is no tmp table in my database
    but still has this problem.
    (I just create the table,and comment the config for droping table.
    But I searched for ORA-01424, as the result show,the tmp table cause the problem.
    I ....

    Ok, if still has problem, please open a new issue and describe more detailed.
    This Issue has deviated from the theme and has been closed.
    Thanks very much