LazyInitializationException
![[Gasip Project] JPA / could not initialize proxy - no Session.](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FLsWRh%2FbtszTAmk0Ll%2F3jARexDmfw7e9xQcv4XiD0%2Fimg.png)
[Gasip Project] JPA / could not initialize proxy - no Session.
잘만되던 CRUD가 갑자기 안되기 시작했다. DB에 저장된 정보 불러오기(Get)을 할 때 이런 문제를 발견했다. 1. 문제 정의 아니 왜 안돼??? 젠장 또 에러메시지야.. LazyInitializationException : could not initialize proxy - no Session 즉, 프록시를 시작할 수 없다 그말씀이시네요. 프록시 문제인 것을 보니 아무래도 JPA 연관관계 매핑에서 오류가 난 듯하다. 2. 해결방안 접근 JPA 연관관계 매핑을 해 둔 엔티티로 가보자. 현재 Professor - Major 가 1:1 연관관계를 맺고 있다. (Professor가 major_ID 를 FK로 갖고 있는 구조다) 아무래도 위 사진에서 major 객체를 OneToOne으로 연관관계 매핑해줄 때..