JPA 에러
-
JPA 오류 java.lang.IllegalStateException: Cannot call sendError() after the response has been committedJPA 2023. 11. 11. 14:38
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed Before 게시판 Board.java @Table(name = "jpa_board") @Entity @Getter @Setter @ToString @NoArgsConstructor public class Board { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "JPA_BOARD_SEQ") @Column(name="bno") private int bno;//게시판(PK) @Column(name="title", columnDefinition = "varchar..
-
오류 org.hibernate.InstantiationException: No default constructor for entity , with 롬복JPA 2023. 11. 9. 16:52
org.hibernate.InstantiationException: No default constructor for entity Entity를 JpaRepository에서 가져올 때 기본 생성자를 사용하는데, 생성자가 없어서 오류가 발생한다는 내용. entity 클래스에 파라미터가 없는 기본생성자를 만들어주는 @NoArgsConstructor 어노테이션을 추가한다. BEFORE Board.java @Table(name = "JPA_BOARD") @Entity @Data @Builder public class Board { ....생략 } AFTER @NoArgsConstructor 추가 @Table(name = "JPA_BOARD") @Entity @Data @NoArgsConstructor public..