You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:30:07 UTC

[GitHub] [shardingsphere] 65725738 opened a new issue #6484: Commons - DBCP cannot be used in 4.1.1

65725738 opened a new issue #6484:
URL: https://github.com/apache/shardingsphere/issues/6484


    Commons - DBCP 1.4  cannot be used in 4.1.1  but can be used in 4.0.1.
   
   The same configuration is just a different version.
   
   WARN 2020-07-28 13:41:08,235 [org.springframework.context.support.ClassPathXmlApplicationContext] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in file [D:\workspacesharding\apache-shardingsphere-4.1.1-src-release\test-sharding\target\test-classes\app_config.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\workspacesharding\apache-shardingsphere-4.1.1-src-release\test-sharding\target\classes\app_config.xml]: Cannot resolve reference to bean 'shardingDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating be
 an with name 'shardingDataSource': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shardingsphere.shardingjdbc.spring.datasource.SpringShardingDataSource]: Constructor threw exception; nested exception is java.lang.AbstractMethodError: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.getSchema()Ljava/lang/String;
   
   
   why?Is there any requirement for DBCP version in 4.1.1?
   
   
   
   


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



[GitHub] [shardingsphere] kimmking closed issue #6484: Commons - DBCP cannot be used in 4.1.1

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #6484:
URL: https://github.com/apache/shardingsphere/issues/6484


   


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



[GitHub] [shardingsphere] tristaZero commented on issue #6484: Commons - DBCP cannot be used in 4.1.1

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #6484:
URL: https://github.com/apache/shardingsphere/issues/6484#issuecomment-664864984


   Hi @65725738 
   Thanks for your question.
   IMO,  this is not about DBCP and more possibility is the sharding configuration. Could you compare your configuration with [4.1.1 examples](https://github.com/apache/shardingsphere/tree/4.1.1/examples/sharding-jdbc-example/sharding-example) ?
   


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



[GitHub] [shardingsphere] kimmking commented on issue #6484: Commons - DBCP cannot be used in 4.1.1

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #6484:
URL: https://github.com/apache/shardingsphere/issues/6484#issuecomment-665449229


   You should use DBCP 2.x to adapter jdbc 4.1+ [1]: 
   ```
   DBCP 2.7.0 compiles and runs under Java 8 only (JDBC 4.2)
   DBCP 2.6.0 compiles and runs under Java 8 only (JDBC 4.2)
   DBCP 2.5.0 compiles and runs under Java 8 only (JDBC 4.2)
   DBCP 2.4.0 compiles and runs under Java 7 only (JDBC 4.1)
   DBCP 1.4 compiles and runs under Java 6 only (JDBC 4)
   DBCP 1.3 compiles and runs under Java 1.4-5.0 only (JDBC 3)
   ```
   
   1. http://commons.apache.org/proper/commons-dbcp/


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