Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 배열빈도수
- docker
- 우분투
- 백준
- 브로드캐스트
- 리눅스계열
- Decapsulation
- SpringApplication
- 포트포워딩 안될때
- 포트포워딩
- javax.management.instancenotfoundexception: org.springframework.boot:type=admin
- wan
- instancenotfoundexception
- 도커권한설정
- 배열복사
- 모래시계출력
- 백준1946
- springboot
- name=springapplication
- 도커
- 오름차순
- 페이로드
- 유니캐스트
- ubuntu
- 디비버
- 네트워크모델
- 배열최소값최대값
- 리눅스환경
- dbeaver
- jmx
Archives
- Today
- Total
다잘하고싶어
[에러]o.s.b.d.LoggingFailureAnalysisReporter 본문
프로젝트 과정에서 git에 merge한 파일을 풀 땡겨서 받아오고, 실행시키니 아래와 같은 에러가 났다.
2022-10-19 21:24:11.795 WARN 16647 --- [ restartedMain] ConfigServletWebServerApplicationContext : 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.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException:
Failed to determine a suitable driver class
2022-10-19 21:24:11.797 INFO 16647 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-10-19 21:24:11.813 INFO 16647 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-10-19 21:24:11.822 ERROR 16647 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
Process finished with exit code 0
콘솔창을 확인해보니 dataSourceScriptDatabaseInitializer 빈을 생성하는 데 실패했고,
그래서 datasource.url 관련된 에러가 난거였다.
보통 이 문제라면 application.properties 파일에 datasource 관련된 설정을 추가해주면 된다.(url, username, password)
그런데 분명 application.properties에 datasource.url 을 설정해줬는데? 하면서 살펴보니
build에만 application.properties 파일이 있고, 아래 src 에는 그 파일이 없었던 것.
확인해보니 팀원이 merge 할 때 .gitignore를 추가해서 파일을 깃에 올렸기 때문에
가장 최신상태의 main branch에는 application.properties 이 없는 상태로 올라와있었고,
나는 아직 .gitignore를 추가하지 않아서 풀 땡겨서 가져온 파일에는 application.properties이 없었던 거다.
따라서 application.properties이 없는 상태에서 프로젝트를 실행시켰으니 당연히 에러가 날 수 밖에 없었다!
팀원에서 application.properties파일을 받아서 src 폴더 안에 넣어주고,
(나중을 위해 .gitignore 도 추가해준 뒤)
다시 실행시키니 정상적으로 잘 실행이 됐다!