코딩 에러 및 질문

코딩 에러 및 질문

return; 무한루프

🌳 에러 코드 무한루프 발생 🌳 해결 방법 🌾 원인 : return; 예외처리 해주지 않아서 무한루프 발생. 🌾 해결 방법 : RuntimeException 예외처리로 해결. After

코딩 에러 및 질문

could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement

🌳 에러 코드 could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement 🌳 해결 방법 🌾 원인 : 자바 entity와 DB의 table이 일치하지 않아서 발생, DDL을 update로 두고 실행하면 위와같은 에러가 발생 🌾 해결 방법 : DB에 있는 해당 테이블을 수정한대로 변경.

코딩 에러 및 질문

Cannot drop column : needed in a foreign key constraint

🌳 에러 코드 Cannot drop column : needed in a foreign key constraint 🌳 해결 방법 🌾 원인 : foreign key로 등록되어 있어서 해당 컬럼 삭제 불가. 🌾 해결 방법 : Warning With foreign_key_checks=0, dropping an index required by a foreign key constraint places the table in an inconsistent state and causes the foreign key check that occurs at table load to fail. To avoid this problem, remove the foreign key constraint before dropping t..

코딩 에러 및 질문

Date 객체 이쁘게 정리

🌳 에러 코드 🌳 해결 방법 🌾 해결 방법 : Date 를 담을 속성에 아래 어노테이션을 추가하면 됩니다. 포멧은 원하는 방식으로 변경하면 됩니다. (Jackson 2.x 이상 기준)@JsonFormat(pattern = "yyyy-MM-dd") Before After

코딩 에러 및 질문

nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

🌳 에러 코드 java.sql.SQLException "could not execute query; SQL [SELECT d.hospitalName, d.hospitalAddress, d.mapx, d.mapy, d.category, d.hospitalPhoneNumber, d.hospitalIntroduce, d.hospitalProfileURL FROM doctor d WHERE d.category = ?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query", 🌳 해결 방법 🌾 해결 방법 : Doctor 엔티티를 사용하지 않고 interface 반환 타입을 만들어서 해결. https://ww..

코딩 에러 및 질문

java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException

🌳 에러 코드 There was an unexpected error (type=Internal Server Error, status=500). com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "connected_at" (class com.smartChart.patient.entity.KakaoProfile), not marked as ignorable (5 known properties: "kakaoAccount", "id", "connectedAt", "properties", "additionalProperties"]) java.lang.RuntimeException: com.fasterxml.jac..

코딩 에러 및 질문

io.jsonwebtoken.MalformedJwtException: Unable to read JSON value: ����&�r#�$�3#Sb'

🌳 에러 코드 io.jsonwebtoken.MalformedJwtException: Unable to read JSON value: ����&�r#�$�3#Sb' 🌳 해결 방법 🌾 원인 : 토큰에 들어온 토큰값이 올바르지 않아서 발생. 🌾 해결 방법 : Bearer JWT 토큰을 지우고 실제 토큰 값으로 교체. Before After

코딩 에러 및 질문

java.lang.IllegalStateException

🌳 에러 코드 "For queries with named parameters you need to provide names for method parameters; Use @Param for query method parameters, or when on Java 8+ use the javac flag -parameters; nested exception is java.lang.IllegalStateException: For queries with named parameters you need to provide names for method parameters; Use @Param for query method parameters, or when on Java 8+ use the javac flag -..

코딩 에러 및 질문

error: pathspec 'develop' did not match any file(s) known to git

🌳 에러 코드 error: pathspec 'develop' did not match any file(s) known to git 🌳 해결 방법 🌾 원인 : 해당 에러는 로컬 저장소의 git과 리모트 저장소의 git 정보가 동기화 되지 않아서, 새로 만들어진 리모트 저장소 브랜치를 참조할 수 없기에 발생하는 에러 🌾 해결 방법 : 아래 명령어로 원격 브랜치를 업데이트 한 뒤 checkout을 실행하면 잘 동작한다! git remote update git checkout 브랜치명 git remote update : 모든 원격 브랜치를 업데이트하여 최신 상태로 갱신한다. 하지만 로컬 저장소에서 변동사항을 병합(merge)하지 않는다.

코딩 에러 및 질문

"message": "Signed Claims JWSs are not supported.",

🌳 에러 코드 "message": "Signed Claims JWSs are not supported.", 🌳 해결 방법 🌾 원인 : 자동완성으로 인한 스펠링 오류. 🌾 해결 방법 : parseClaimsJwt -> parseClaimsJws 로 수정. Before After

요가하는 개발자
'코딩 에러 및 질문' 카테고리의 글 목록 (2 Page)