简体   繁体   English

无法将“”下的属性绑定到com.zaxxer.hikari.HikariDataSource:

[英]Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:

I'm trying to create a web application using Spring Boot(STS), but I got the following error while running through server(JBoss) 我正在尝试使用Spring Boot(STS)创建Web应用程序,但是在通过服务器(JBoss)运行时出现以下错误

12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93)   .   ____          
  _            __ _ _

   12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93)  /\\ / 
     ___'_ __ 
     _ _(_)_ __  __ _ \ \ \ \

  12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93) ( ( )\___ | 
 '_ 
   | '_| | '_ \/ _` | \ \ \ \

  12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93)  \\/  ___)| 
   |_)| | | | | || (_| |  ) ) ) )

  12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93)   '  |____| 
  .__|_| |_|_| |_\__, | / / / /

  12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93)  
   =========|_|==============|___/=/_/_/_/

  12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93)  :: Spring Boot 
  ::        (v2.1.3.RELEASE)

  12:01:24,091 INFO  [stdout] (ServerService Thread Pool -- 93) 

  12:01:24,184 INFO  [com.example.demoSpringWeb.ServletInitializer] 
  (ServerService Thread Pool -- 93) Starting ServletInitializer on IIPLSYS0064 
  with PID 2444 (D:\MizoAttendanceTools\Server\jboss-eap- 
 7.1.0\standalone\deployments\demoSpringWeb-0.0.1-SNAPSHOT.war\WEB-INF\classes 
  started by i00629 in D:\MizoAttendanceTools\Server\jboss-eap-7.1.0\bin)
  12:01:24,184 INFO  [com.example.demoSpringWeb.ServletInitializer] 
(ServerService Thread Pool -- 93) No active profile set, falling back to 
  default profiles: default
  12:01:24,264 INFO  
 [org.springframework.boot.devtools.env.DevToolsPropertyDefaultsPostProcessor] 
(ServerService Thread Pool -- 93) For additional web related logging consider 
setting the 'logging.level.web' property to 'DEBUG'
 12:01:25,442 INFO  
[org.springframework.data.repository.config.RepositoryConfigurationDelegate] 
(ServerService Thread Pool -- 93) Bootstrapping Spring Data repositories in 
DEFAULT mode.
  12:01:25,472 INFO  
[org.springframework.data.repository.config.RepositoryConfigurationDelegate] 
(ServerService Thread Pool -- 93) Finished Spring Data repository scanning in 
16ms. Found 0 repository interfaces.
12:01:26,191 INFO  





[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] (ServerService Thread Pool -- 93) Bean 



'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type 


[org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$be5f65f5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
12:01:26,286 INFO  [io.undertow.servlet] (ServerService Thread Pool -- 93) Initializing Spring embedded WebApplicationContext
12:01:26,286 INFO  [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 93) Root WebApplicationContext: initialization completed in 2021 ms
12:01:26,722 ERROR [com.zaxxer.hikari.HikariConfig] (ServerService Thread Pool -- 93) Failed to load driver class org.postgresql.Driver from HikariConfig class classloader ModuleClassLoader for Module "deployment.demoSpringWeb-0.0.1-SNAPSHOT.war" from Service Module Loader
12:01:26,738 WARN  [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] (ServerService Thread Pool -- 93) Exception encountered during context initialization - cancelling refresh attempt: 
org.springframework.context.ApplicationContextException: Unable to start web 
server; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'servletEndpointRegistrar' defined in class path resource 

[org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthIndicatorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthIndicatorAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthIndicatorRegistry]: Factory method 'healthIndicatorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 


'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration': Unsatisfied dependency expressed through constructor 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.context.properties.bind.BindException: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource
12:01:26,739 INFO  [org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener] (ServerService Thread Pool -- 93) 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
12:01:26,755 ERROR [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] 
(ServerService Thread Pool -- 93) 

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:

Property: driverclassname
Value: org.postgresql.Driver
Origin: "driverClassName" from property source "source"
Reason: Failed to load driver class org.postgresql.Driver in either of 
HikariConfig class loader or Thread context classloader

Action:

 Update your application's configuration

You don't have driver on your classpath. 您的类路径上没有驱动程序。

Add postgresql dependency under pom.xml like below. 在pom.xml下添加postgresql依赖项,如下所示。

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法将“下的属性绑定到 com.zaxxer.hikari.HikariDataSource:” Springboot - Failed to bind properties under " to com.zaxxer.hikari.HikariDataSource:" Springboot 无法将 &#39;&#39; 下的属性绑定到 com.zaxxer.hikari.HikariDataSource - Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource 无法将“”下的属性绑定到 com.zaxxer.hikari.HikariDataSource: spring boot 2.4.1 - Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource: spring boot 2.4.1 如何修复“无法将''下的属性绑定到 com.zaxxer.hikari.HikariDataSource”错误? - How do i fix the “Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource” error? 使用com.zaxxer.hikari.HikariDataSource时出错 - Error using com.zaxxer.hikari.HikariDataSource Spring 启动 JPA 与骆驼 JPA 引发无法实例化 [com.zaxxer.hikari.HikariDataSource] - Spring Boot JPA with Camel JPA throws Failed to instantiate [com.zaxxer.hikari.HikariDataSource] 无法将“”下的属性绑定到 com.zaxxer.hikari - Failed to bind properties under '' to com.zaxxer.hikari 无法实例化 com.zaxxer.hikari.HikariDataSource:工厂方法“dataSource”异常,消息:无法确定合适的驱动程序 class - Failed to instantiate com.zaxxer.hikari.HikariDataSource: Factory method 'dataSource'exception with message: Failed to determine suitable driver class NoSuchMethodError: com.zaxxer.hikari.HikariDataSource.getMetricsTrackerFactory()Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory - NoSuchMethodError: com.zaxxer.hikari.HikariDataSource.getMetricsTrackerFactory()Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:name=dataSource,type=HikariDataSource - javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:name=dataSource,type=HikariDataSource
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM