could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet (spring boot & mariadb & jpa 연결 이슈)

2021. 1. 24. 15:34·개발/JPA
728x90

환경 : 인텔리인텔리제이 , gradle , jpa , mariadb, spring boot

 

could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet

 

spring boot에서 개발 도중 위 와 같은 이슈 발생

 

 

1. application.yml 파일에서 아래와 같이 사용 중이었습니다.

 

spring:
  datasource:
    url: jdbc:mariadb://127.0.0.1:3306/local?characterEncoding=UTF-8&serverTimezone=UTC

 

2. build.gradle 사용 중 내용

 

implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-devtools'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'mysql:mysql-connector-java'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

testImplementation("org.junit.vintage:junit-vintage-engine") {
  exclude group: "org.hamcrest", module: "hamcrest-core"
}

 

 

이렇게 사용했을 때의 이슈가 났기 때문에 mariadb 연결 방식을 변경 

 

1. application.yml

 

spring:
  datasource:
    url: jdbc:mysql://127.0.0.1:3306/local?characterEncoding=UTF-8&serverTimezone=UTC

 

 

2. build.gradle 

 

implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-devtools'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'mysql:mysql-connector-java'
// runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

testImplementation("org.junit.vintage:junit-vintage-engine") {
  exclude group: "org.hamcrest", module: "hamcrest-core"
}

 

일단 문제는 해결되었습니다. 왜 mariadb는 안되고 mysql 변경을 하였을 때 되었는지는 이유를 알 수 없습니다.

선배님들이 댓글로 알려주시면 감사하겠습니다.

728x90

'개발 > JPA' 카테고리의 다른 글

jpa QueryDSL Dialect 설정  (0) 2022.08.16
queryDSL 중복 데이터 하나만 남기고 제거  (0) 2022.07.26
JPA 생성자 DI 리팩토링  (0) 2021.02.16
EntityManager  (0) 2021.02.12
spring boot & JPA & mysql(mariadb) 세팅 및 연동  (0) 2021.01.21
'개발/JPA' 카테고리의 다른 글
  • queryDSL 중복 데이터 하나만 남기고 제거
  • JPA 생성자 DI 리팩토링
  • EntityManager
  • spring boot & JPA & mysql(mariadb) 세팅 및 연동
nix-be
nix-be
  • nix-be
    NiX
    nix-be
  • 전체
    오늘
    어제
    • 홈
      • 책
        • 오브젝트
      • 성장
        • jpa Querydsl 정리
        • 코딩테스트
      • 인프라
        • linux
        • vmware
        • CI&CD
        • 네트워크
        • docker
      • 개발
        • spring boot
        • JPA
        • java
        • thymeleaf
        • 이슈
        • jquery
        • javascript
        • 안드로이드
      • DB
        • postgreSql
      • 잡다한것
        • 프로그램
        • 일상 관련
      • 회사
        • 티
  • 블로그 메뉴

    • 홈
    • 개발
  • 링크

  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
nix-be
could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet (spring boot & mariadb & jpa 연결 이슈)
상단으로

티스토리툴바