https://cantcoding.tistory.com/78
JPA/ could not initialize proxy - no Session
1.문제점 JPA를 통한 개발을 하다보면 한번쯤 만날 수 밖에없는 에러이다. JPA를 사용하여 DB에 저장된 리소스를 불러와서 반환하는 경우, 혹은 사용할 때 발생했던 에러이다. 2.접근 JPA에 대한 이
cantcoding.tistory.com
https://byungil.tistory.com/241
JPA Error: 흔히 접할 수 있는 에러 could not initialize proxy - no Session
JPA Error: could not initialize proxy - no Session 접근 JPA강의에서 분명히 이거에 대한 내용을 다뤘던 거 같은데 기억이 안난다.. 영속성 컨텍스트, Proxy, Lazy Loading에 대한 이해가 필요함. Lazy Loading 내용은
byungil.tistory.com
@ManyToOne한 테이블 Member에서 memberId는 괜찮았지만 nickname이 안가져와지는 에러
트랜잭션과 관련됨
DTO 변환을 Controller에서 Service로 변경하도록 한다
번외
https://velog.io/@yarogono/JPA-could-not-initialize-proxy-no-Session-%EC%97%90%EB%9F%AC
[JPA] could not initialize proxy - no Session 에러
JPA를 사용하면서 자주 접하는 에러이다. 쉽게 해결하고 넘어갈 수 있는 내용이지만, 파고 공부하면 얻을게 상당히 많아서 글로 작성해봤다. 글을 통해 JPA와 더 친해져보자.
velog.io
JPQL 이용
EAGER
등등
'Spring > error log' 카테고리의 다른 글
Cannot find method 'value' (0) | 2024.11.25 |
---|---|
the emulator process for avd pixel_2_api_34 has terminated. (0) | 2024.09.04 |
Local variable is redundant (0) | 2024.07.29 |
Multipart @ModelAttribute @Setter (0) | 2024.07.14 |
gradle 설정이 이상하면 오른쪽 사이드에서 - 해서 삭제해주고 다시 Load Gradle (0) | 2024.07.09 |