You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/02/28 09:43:56 UTC

[GitHub] KomachiSion opened a new issue #1948: CachedDatabaseMetaData throw exception when JDBC Driver is postgreSQL JDBC

KomachiSion opened a new issue #1948: CachedDatabaseMetaData throw exception when JDBC Driver is postgreSQL JDBC
URL: https://github.com/apache/incubator-shardingsphere/issues/1948
 
 
   `CachedDatabaseMetaData` will cache all attributes of `DatabaseMetaData`, but postgreSQL JDBC not implement `getRowIdLifetime` method so that program throw exception like this 
   
   ```
   Caused by: java.sql.SQLFeatureNotSupportedException: 这个 org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作。
   	at org.postgresql.Driver.notImplemented(Driver.java:688) ~[postgresql-42.2.5.jar:42.2.5]
   	at org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime(PgDatabaseMetaData.java:2562) ~[postgresql-42.2.5.jar:42.2.5]
   	at org.apache.commons.dbcp2.DelegatingDatabaseMetaData.getRowIdLifetime(DelegatingDatabaseMetaData.java:768) ~[commons-dbcp2-2.5.0.jar:2.5.0]
   	at org.apache.commons.dbcp2.DelegatingDatabaseMetaData.getRowIdLifetime(DelegatingDatabaseMetaData.java:768) ~[commons-dbcp2-2.5.0.jar:2.5.0]
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.datasource.metadata.CachedDatabaseMetaData.<init>(CachedDatabaseMetaData.java:431) ~[sharding-jdbc-core-4.0.0.M1-SNAPSHOT.jar:na]
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.ShardingContext.createCachedDatabaseMetaData(ShardingContext.java:75) ~[sharding-jdbc-core-4.0.0.M1-SNAPSHOT.jar:na]
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.ShardingContext.<init>(ShardingContext.java:62) ~[sharding-jdbc-core-4.0.0.M1-SNAPSHOT.jar:na]
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.datasource.ShardingDataSource.<init>(ShardingDataSource.java:54) ~[sharding-jdbc-core-4.0.0.M1-SNAPSHOT.jar:na]
   	at org.apache.shardingsphere.shardingjdbc.api.ShardingDataSourceFactory.createDataSource(ShardingDataSourceFactory.java:50) ~[sharding-jdbc-core-4.0.0.M1-SNAPSHOT.jar:na]
   	at io.shardingsphere.issue.config.IssueConfiguration.dataSource(IssueConfiguration.java:79) ~[classes/:na]
   	at io.shardingsphere.issue.config.IssueConfiguration$$EnhancerBySpringCGLIB$$10ed2c4e.CGLIB$dataSource$0(<generated>) ~[classes/:na]
   	at io.shardingsphere.issue.config.IssueConfiguration$$EnhancerBySpringCGLIB$$10ed2c4e$$FastClassBySpringCGLIB$$b27c52fa.invoke(<generated>) ~[classes/:na]
   	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
   	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
   	at io.shardingsphere.issue.config.IssueConfiguration$$EnhancerBySpringCGLIB$$10ed2c4e.dataSource(<generated>) ~[classes/:na]
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.20.RELEASE.jar:4.3.20.RELEASE]
   	... 41 common frames omitted
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services