아틴
Atin
아틴
전체 방문자
오늘
어제
  • 분류 전체보기 (460)
    • Devlopment (246)
      • 정리 글 (20)
      • MicroServices (0)
      • Reactive, Concurrenc.. (12)
      • Java (44)
      • Spring (20)
      • C,C++,Ruby,Python (52)
      • Mobile (39)
      • Web (35)
      • Tip & Info (14)
      • Unit Test (7)
    • Infra (44)
      • OS (21)
      • RDBMS (13)
      • NoSQL&Cache (5)
      • AWS (4)
    • Computer Science (11)
    • Etc (156)

블로그 메뉴

  • Home
  • Guestbook

공지사항

인기 글

태그

  • 정읍
  • TRPG
  • jsp
  • 아이폰
  • Linux
  • 전라도
  • 던젼 앤 드래곤즈
  • Ruby on Rails
  • javascript
  • mysql
  • CSS
  • Python
  • Java
  • 해킨토시
  • Dungeons & Dragons
  • 자바
  • 안드로이드
  • 여행
  • C
  • Android

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
아틴

Atin

Devlopment/Spring

JPA Hibernate 사용 중 ORA-00001: 무결성 제약 조건( ORA-00001 에러

2016. 6. 7. 21:07
반응형

개발 도중 이상한 에러와 직면했다.

분명 무결성 제약 조건에 걸릴 일이 없는데 자꾸 무결성 제약 조건 에러가 나는 것이었다.

별거 아닌데, 1시간을 넘게 에러를 찾게 되었고, 결과는 역시 JPA에 대한 사용 미숙이었다.



  Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: 무결성 제약 조건(***.*****)에 위배됩니다


  Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement


  org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [***.*****];

  nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement 



내가 Entity 클래스를 만들 때,

숫자형 키값을 가지는 부분에 대한 변수 타입으로 long을 선언했다.

그런데 키값을 이렇게 하면 무엇이 문제인지는 모르겠으나 문제가 있는것으로 보인다.

해당 변수 타입을 Long으로 변경을 해주니 정상적으로 작동하며 문제가 해결되었다.



반응형
저작자표시 비영리 변경금지 (새창열림)

'Devlopment > Spring' 카테고리의 다른 글

[Spring Security] 필터 Filter, SecurityFilterChain 이해하기  (1) 2017.02.08
[SpringSecurity] Method 레벨에서 AccessDeniedException 처리하기  (0) 2017.02.07
Spring Security custom expression  (0) 2017.02.01
Spring Security 관련 레퍼런스 정리  (0) 2017.02.01
Jackson에서 null string 안 보이게 설정  (1) 2016.08.12
Spring에서 기본적인 component-scan 설정  (0) 2016.05.23
Spring에서 Pageable, Valid 설정 유의 설정  (0) 2016.05.23
QueryDSL  (0) 2016.05.17
Hibernate Dialect (ORA-00933 Pagable error)  (0) 2016.05.17
JPA, Hibernate 속성 정리  (0) 2016.02.29
    'Devlopment/Spring' 카테고리의 다른 글
    • Spring Security 관련 레퍼런스 정리
    • Jackson에서 null string 안 보이게 설정
    • Spring에서 기본적인 component-scan 설정
    • Spring에서 Pageable, Valid 설정 유의 설정
    아틴
    아틴

    티스토리툴바