将springboot版本从1.5更改为2后,由于HikariCP,QuartzDataSourceInitializer失败了

时间:2019-03-24 15:30:21

标签: spring-boot hikaricp quartz

在springboot 2.0中, 当我在数据源配置中不提供驱动程序类名称时,数据源URL为jdbc:sap://不会被识别为HANA DB。

如果我提供驱动程序类名称,那么HIKARICP会抱怨

由以下原因引起:java.lang.IllegalStateException:池的配置一旦启动就被密封。使用HikariConfigMXBean进行运行时更改。

这是由于石英造成的,

原因: org.springframework.beans.factory.UnsatisfiedDependencyException:在类路径资源[org / springframework / boot / autoconfigure / quartz / QuartzAutoConfiguration $ JdbcStoreTypeConfiguration.class]中创建名称为“ quartzDataSourceInitializer”的bean时出错:通过方法“ quartzDataSourceInitializer”参数表示的不满意依赖关系0;嵌套的异常是org.springframework.boot.context.properties.ConfigurationPropertiesBindException:创建名称为“ dataSource”的bean时出错:无法将属性绑定到“ HikariDataSource”:prefix = app.datasource,ignoreInvalidFields = false,ignoreUnknownFields = true;嵌套异常是org.springframework.boot.context.properties.bind.BindException:无法将“ app.datasource”下的属性绑定到javax.sql.DataSource

错误

启动Tomcat上下文时出错。异常:org.springframework.beans.factory.BeanCreationException。消息:创建名称为'org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration $ DispatcherServletRegistrationConfiguration'的bean时出错:通过构造函数实例化Bean失败;嵌套的异常是org.springframework.beans.BeanInstantiationException:无法实例化[org.springframework.boot.auto.config.web.servlet.DispatcherServletAutoConfiguration $ DispatcherServletRegistrationConfiguration $$ EnhancerBySpringCGLIB $$ 2189fb49]:构造方法引发了异常;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ xApplication”的bean时出错:通过字段“ scheduledJobManager”表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ scheduledJobManager”的bean时出错:通过字段“ simpleScheduler”表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建文件[/y/x/-app/service/target/classes/y/x/service/schedule/SimpleScheduler.class中定义的名称为'simpleScheduler'的bean时出错]:通过构造函数参数0表示不满意的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:在类路径资源[org / springframework / boot / autoconfigure / quartz / QuartzAutoConfiguration $ JdbcStoreTypeConfiguration.class]中创建名称为“ quartzDataSourceInitializer”的bean时创建错误:通过方法“ crystalDataSourceInitializer'参数0;嵌套的异常是org.springframework.boot.context.properties.ConfigurationPropertiesBindException:创建名称为“ dataSource”的bean时出错:无法将属性绑定到“ HikariDataSource”:prefix = app.datasource,ignoreInvalidFields = false,ignoreUnknownFields = true;嵌套异常是org.springframework.boot.context.properties.bind.BindException:无法将“ app.datasource”下的属性绑定到javax.sql.DataSource 2019-03-24 20:27:43 x-app WARN AnnotationConfigServletWebServerApplicationContext:557-上下文初始化期间遇到异常-取消刷新尝试:org.springframework.context.ApplicationContextException:无法启动Web服务器;嵌套的异常是org.springframework.boot.web.server.WebServerException:无法启动嵌入式Tomcat 2019-03-24 20:27:43 x-app INFO ConditionEvaluationReportLoggingListener:101-

我正在尝试将springboot版本从1.5升级到2。

无法将“ app.datasource”下的属性绑定到javax.sql.DataSource:

Property: app.datasource.driver-class-name
Value: com.sap.db.jdbc.Driver
Origin: URL [file:target/classes/config/application-local-hana.properties]:40:34
Reason: Unable to set value for property driver-class-name

操作:

更新您的应用程序配置

HIKARICP应该允许我运行该应用程序。

0 个答案:

没有答案