pan1998 commented on issue #37728:
URL: 
https://github.com/apache/shardingsphere/issues/37728#issuecomment-3743250479

   When I use sharding jdbc 5.5.2 to shard tables in the **Dameng 8 database**, 
it also fails.
   Operating environment: JDK11 + Hibernate 5.6 + Spring, with other 
configuration details as above.
   
   
   Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'acceptAutoRecordDao': Injection of resource 
dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'sessionFactory' defined in class path resource 
[applicationContext.xml]: Cannot resolve reference to bean 'shardingDataSource' 
while setting bean property 'dataSource'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'shardingDataSource' defined in class path resource 
[applicationContext.xml]: Invocation of init method failed; nested exception is 
java.sql.SQLException: java.util.concurrent.ExecutionException: 
java.lang.NullPointerException
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:321)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:127)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:275)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:243)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        ... 26 more
   Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'sessionFactory' defined in class path resource 
[applicationContext.xml]: Cannot resolve reference to bean 'shardingDataSource' 
while setting bean property 'dataSource'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'shardingDataSource' defined in class path resource 
[applicationContext.xml]: Invocation of init method failed; nested exception is 
java.sql.SQLException: java.util.concurrent.ExecutionException: 
java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1702)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1447)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:453)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:528)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:498)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:651)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:318)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:127)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:275)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:243)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        ... 26 more
   Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'shardingDataSource' defined in class path resource 
[applicationContext.xml]: Invocation of init method failed; nested exception is 
java.sql.SQLException: java.util.concurrent.ExecutionException: 
java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1702)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1447)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:453)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:528)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:498)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:651)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:318)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
 ~[spring-beans-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
 ~[spring-context-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:127)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:275)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:243)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        at 
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
 ~[spring-test-5.2.20.RELEASE.jar:5.2.20.RELEASE]
        ... 26 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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to