JPA
[오류해결] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ~
[오류해결] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ~
2024.03.05오류 발생 스프링부트에서 Author 라는 Entity와 AuthorRepository라는 Repository를 호출하는 코드를 실행했을 때 다음 오류가 발생했다. org.springframework.beans.factory.UnsatisfiedDependencyException Caused by: org.springframework.beans.factory.BeanCreationException Caused by: java.lang.IllegalArgumentException 오류 상세 보다 자세한 오류 내용은 다음과 같다. 3단계에 걸쳐 실제 호출해서 오류가 발생한 지점부터 근원지까지의 오류 발생 내용이 기록되어있다. 오류 내용을 제외한 나머지 내용은 길어서 생략했다. 2024-03-05T09:06:..
[오류해결::JPA] Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement
[오류해결::JPA] Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement
2022.06.24문제 발생 JpaRepository에 @Query 애너테이션에 nativeQuery = true 옵션을 추가하고 서버를 실행하니 다음과 같은 오류들이 발생했습니다. 오류 Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "CREATEDATE" not found; SQL statement: FAILED org.springframework.dao.InvalidDataAccessResourceUsageException at QueryAnnotationTest.java:43 Caused by: org.hibe..
[오류해결::JPA] Caused by: java.net.ConnectException: Connection refused (Connection refused)
[오류해결::JPA] Caused by: java.net.ConnectException: Connection refused (Connection refused)
2022.06.21Caused by: java.net.ConnectException: Connection refused (Connection refused) 문제 발생 상황 서버를 실행하니 다음과 같은 오류들이 발생했습니다. 오류 Caused by: java.net.ConnectException: Connection refused (Connection refused) Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Connection is broken Caused by: org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution Caused b..
[오류해결::JPA] Caused by: org.hibernate.AnnotationException: No identifier specified for entity
[오류해결::JPA] Caused by: org.hibernate.AnnotationException: No identifier specified for entity
2022.06.21문제 발생 상황 서버를 실행하니 Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com.example.demo.domain.Board 라는 오류가 발생했습니다. 원인 분석 Entity에 Id를 설정하지 않은 경우 발생하는 오류입니다. 저는 아래와 같은 Entity를 추가했을 때 오류가 발생했습니다. 코드에서 확인 가능하듯이 Id로 선택한 클래스 멤버 변수가 없습니다. package com.example.demo.domain; import lombok.Getter; import lombok.Setter; import lombok.ToString; import javax.persistence.*; import ..