You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/07/26 08:31:17 UTC
[GitHub] [servicecomb-java-chassis] lizeze commented on issue #3222: 配合JPA使用的一些问题
lizeze commented on issue #3222:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3222#issuecomment-1195174494
我的示例代码 https://github.com/lizeze/jpa-demo1
日志信息
```
[] 2022-07-26 16:30:01,937 [INFO] [main] - Found main class "org.example.Main". (JvmUtils.java:94)
[] 2022-07-26 16:30:01,937 [INFO] [main] - Found main class "org.example.Main" by stackTrace. (JvmUtils.java:63)
[] 2022-07-26 16:30:01,937 [INFO] [main] - Scb scan package list: org.apache.servicecomb,org.example (BeanUtils.java:118)
[] 2022-07-26 16:30:02,969 [INFO] [main] - Bootstrapping Spring Data JPA repositories in DEFAULT mode. (RepositoryConfigurationDelegate.java:132)
[] 2022-07-26 16:30:03,062 [INFO] [main] - Finished Spring Data repository scanning in 85 ms. Found 1 JPA repository interfaces. (RepositoryConfigurationDelegate.java:201)
[] 2022-07-26 16:30:03,344 [INFO] [main] - Found SPI service org.apache.servicecomb.foundation.bootstrap.BootStrapService, count=1. (SPIServiceUtils.java:79)
[] 2022-07-26 16:30:03,344 [INFO] [main] - 0. org.apache.servicecomb.serviceregistry.auth.RBACBootStrapService. (SPIServiceUtils.java:82)
[] 2022-07-26 16:30:03,344 [INFO] [main] - Environment received, will get configurations from [org.springframework.core.env.StandardEnvironment@2038185019]. (ConfigurationSpringInitializer.java:149)
[] 2022-07-26 16:30:03,390 [WARN] [main] - No URLs will be polled as dynamic configuration sources. (URLConfigurationSource.java:126)
[] 2022-07-26 16:30:03,390 [INFO] [main] - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. (URLConfigurationSource.java:127)
[] 2022-07-26 16:30:03,406 [INFO] [main] - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@d2e6b0b (DynamicPropertyFactory.java:281)
[] 2022-07-26 16:30:03,406 [INFO] [main] - create local config from paths=[:/:/s/n/2/y/g/e/b/y/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/e/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/c/5/!/microservice.yaml,:/:/s/n/p/o/1/t/s/microservice.yaml] (ConfigUtil.java:130)
[] 2022-07-26 16:30:03,437 [INFO] [main] - create local config from paths=[:/:/s/n/2/y/g/e/b/y/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/e/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/c/5/!/microservice.yaml,:/:/s/n/p/o/1/t/s/microservice.yaml] (ConfigUtil.java:130)
[] 2022-07-26 16:30:03,453 [INFO] [main] - Found SPI service org.apache.servicecomb.config.spi.ConfigCenterConfigurationSource, count=2. (SPIServiceUtils.java:79)
[] 2022-07-26 16:30:03,453 [INFO] [main] - 0. org.apache.servicecomb.config.ConfigCenterConfigurationSourceImpl. (SPIServiceUtils.java:82)
[] 2022-07-26 16:30:03,453 [INFO] [main] - 1. org.apache.servicecomb.config.kie.KieConfigurationSourceImpl. (SPIServiceUtils.java:82)
[] 2022-07-26 16:30:03,453 [INFO] [main] - create local config from paths=[:/:/s/n/2/y/g/e/b/y/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/e/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/c/5/!/microservice.yaml,:/:/s/n/p/o/1/t/s/microservice.yaml] (ConfigUtil.java:130)
[] 2022-07-26 16:30:03,453 [INFO] [main] - create local config from paths=[:/:/s/n/2/y/g/e/b/y/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/e/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/c/5/!/microservice.yaml,:/:/s/n/p/o/1/t/s/microservice.yaml] (ConfigUtil.java:130)
[] 2022-07-26 16:30:03,469 [INFO] [main] - create local config from paths=[:/:/s/n/2/y/g/e/b/y/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/e/5/!/microservice.yaml,:/:/s/n/2/y/g/e/b/c/5/!/microservice.yaml,:/:/s/n/p/o/1/t/s/microservice.yaml] (ConfigUtil.java:130)
[] 2022-07-26 16:30:03,469 [INFO] [main] - Found SPI service org.apache.servicecomb.deployment.DeploymentProvider, count=3. (SPIServiceUtils.java:79)
[] 2022-07-26 16:30:03,469 [INFO] [main] - 0. org.apache.servicecomb.config.collect.ConfigCenterDefaultDeploymentProvider. (SPIServiceUtils.java:82)
[] 2022-07-26 16:30:03,469 [INFO] [main] - 1. org.apache.servicecomb.config.kie.collect.KieCenterDefaultDeploymentProvider. (SPIServiceUtils.java:82)
[] 2022-07-26 16:30:03,469 [INFO] [main] - 2. org.apache.servicecomb.serviceregistry.collect.ServiceCenterDefaultDeploymentProvider. (SPIServiceUtils.java:82)
[] 2022-07-26 16:30:03,469 [INFO] [main] - config center server is not configured. (ConfigCenterConfigurationSourceImpl.java:81)
[] 2022-07-26 16:30:03,469 [INFO] [main] - Kie server is not configured. (KieConfigurationSourceImpl.java:77)
[] 2022-07-26 16:30:03,469 [INFO] [main] - none of config center source enabled. (ConfigUtil.java:222)
[] 2022-07-26 16:30:03,640 [INFO] [main] - Bean 'priorityPropertyFactory' of type [org.apache.servicecomb.config.priority.PriorityPropertyFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) (PostProcessorRegistrationDelegate.java:376)
[] 2022-07-26 16:30:03,640 [INFO] [main] - Bean 'configObjectFactory' of type [org.apache.servicecomb.config.priority.ConfigObjectFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) (PostProcessorRegistrationDelegate.java:376)
[] 2022-07-26 16:30:03,640 [INFO] [main] - Bean 'priorityPropertyManager' of type [org.apache.servicecomb.config.priority.PriorityPropertyManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) (PostProcessorRegistrationDelegate.java:376)
[] 2022-07-26 16:30:03,672 [WARN] [main] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoco
nfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class (AbstractApplicationContext.java:591)
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable
driver class
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:95)
at org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:65)
at org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:56)
at org.example.Main.main(Main.java:11)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 19 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 33 more
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:252)
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:193)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:48)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:90)
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.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 34 more
Process finished with exit code 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.
To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org