티스토리 뷰
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Invocation of init method failed; nested exception is javax.persistence.PersistenceException:
[PersistenceUnit: default] Unable to build Hibernate SessionFactory;
nested exception is org.hibernate.loader.MultipleBagFetchException:
cannot simultaneously fetch multiple bags:
[com.mindone.okch.inspection.domain.InspLdg.ftrs,
com.mindone.okch.inspection.domain.InspLdg.cctvs]
// 조사시설물
@JsonIgnoreProperties("inspLdg")
@OneToMany(mappedBy = "inspLdg", cascade = CascadeType.ALL, fetch = FetchType.EAGER) // 20200626 FetchType.LAZY에서 EAGER로 수정 by ljpark XSS적용 위해
private List<InspFtr> ftrs;
public void setFtrs(List<InspFtr> ftrs) {
this.ftrs = ftrs;
for(InspFtr ftr : ftrs)
ftr.setInspLdg(this);
}
@JsonIgnoreProperties("inspLdg") //cctv
@OneToMany(mappedBy="inspLdg", cascade=CascadeType.ALL, fetch = FetchType.EAGER) // 20200626 FetchType.LAZY에서 EAGER로 수정 by ljpark XSS적용 위해
private List<Cctv> cctvs;
public void setCctvs(List<Cctv> cctvs) {
this.cctvs = cctvs;
if(cctvs != null)
for(Cctv cctv : cctvs)
cctv.setInspLdg(this);
}
FetchType.LAZY에서 EAGER로 수정했는데.. MultipleBagFetchException이 발생했다..ㅠㅠ
'Skill > JPA' 카테고리의 다른 글
[JPA] Querydsl 1분주기 데이터 중 10분 데이터 가져오기 (0) | 2020.09.22 |
---|---|
Hibernate enable_lazy_load_no_trans Property (0) | 2020.08.18 |
[JPA] DB에 없는 필드 관련 (0) | 2020.08.14 |
[JPA] Open Session In View (0) | 2020.06.26 |
[JPA] MessageConverterConfiguration 적용시 에러 (0) | 2020.06.26 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- caniuse
- draw.io
- PostgreSQL
- $.each
- Keycode
- 전후방탐색
- getter
- QueryDSL
- setter
- 여러 컬럼 update
- springboot
- lombok
- 정규식
- @ExceptionHandler
- devtools
- JQuery
- 프로젝트명변경
- border-collapse
- oracle
- Javascript
- object key
- spring
- sumifs
- ul li로 테이블
- $.extend
- DatePicker
- CSS
- element위치
- 진열사랑
- excel
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함