首页 > 解决方案 > 启动 spring boot 应用程序,导致 java.lang.RuntimeException

问题描述

我正在为 rds mysql 数据库实现密码管理器。这是一个弹簧启动应用程序。启动时,应用程序抛出以下错误。

WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext.refresh - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactoryBuilder' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactoryBuilder' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl, jdbc-secretsmanager:mysql://dev-transaction-summary-db.cluster-csuuxb898zxl.us-east-1.rds.amazonaws.com:3306/transaction_summary?serverTimezone=UTC&useSSL=true&serverSslCert=/opt/rds-certs/rds-combined-ca-bundle.pem INFO o.a.catalina.core.StandardService.log - Stopping service [Tomcat] [localhost-startStop-1] WARN o.a.c.loader.WebappClassLoaderBase.log - The web application [ROOT] appears to have started a thread named [java-sdk-http-connection-reaper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Thread.sleep(Native Method)

标签: spring-bootaws-secrets-manager

解决方案


推荐阅读