[Error Note] java.lang.IllegalStateException: closed 해결 방법 [ResponseBody.string()을 여러 번 호출]
·
◈ Study/에러노트(Error Note)🧱
- java.lang.IllegalStateException: closed 해결 방법 java.lang.IllegalStateException: closed at okio.RealBufferedSource.select(RealBufferedSource.kt:218) at okhttp3.internal.Util.readBomAsCharset(Util.kt:265) at okhttp3.ResponseBody.string(ResponseBody.kt:187) at G2B.g2b.service.BidService.testAPI(BidService.java:716) at G2B.g2b.controller.MainController.index(MainController.java:20) at java.base/jdk..
[Error Note] URL 리라이트 때문에 request block 발생하는 문제 해결하기 [;jsessionid=xxx가 사용되면서 request block 발생]
·
◈ Study/에러노트(Error Note)🧱
- URL 리라이트 때문에 request block 발생하는 문제 해결하기WAF, 방화벽 등에서 ;jsessionid=xxx가 포함된 URL을 비정상적인 요청으로 간주하고 차단한다.- 해결 방법1) WAF 예외 설정WAF 또는 방화벽에서 ;jsessionid= 패턴을 허용하도록 설정보안 정책을 조정하여 특정 URL에서는 JSESSIONID 포함을 허용2) 쿠키 기반 세션 유지로 변경가능하면 JSESSIONID를 URL이 아니라 쿠키 방식으로만 사용하도록 설정web.xml에서 URL 리라이트를 비활성화 disableURLRewriting true [study] URL 리라이트(URL Rewriting)란 무엇인가? [JSESSIONID를 URL에 포함하는 방식]- URL 리라이트(URL Rewr..
[Error Note] ORA-17132: 부적합한 변환이 요청되었습니다. [Error getting generated key or setting result to parameter object.]
·
◈ Study/에러노트(Error Note)🧱
- ORA-17132: 부적합한 변환이 요청되었습니다.MyBatis @Options 어노테이션에서 에러가 발생하였다.Error getting generated key or setting result to parameter object. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Error getting generated key or setting result to parameter object. Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get colum..
[Error Note] ORA-17004: 열 유형이 부적합합니다. [Could not set parameters for mapping]
·
◈ Study/에러노트(Error Note)🧱
- ORA-17004: 열 유형이 부적합합니다.MyBatis를 쓰는데 에러가 발생하였다. 열 유형이 부적합하다고 한다.org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='rawData.wayfId', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.a..
[Error Note] Local variable defined in an enclosing scope must be final or effectively final [forEach 안에서 변수 초기화 에러]
·
◈ Study/에러노트(Error Note)🧱
- Local variable defined in an enclosing scope must be final or effectively final forEach 문 안에서 변수 초기화를 시도하였으나, 에러를 만나게 되었다. 해당 에러는 람다(Lambda)식을 사용할 때 발생하는 에러이다. 바깥쪽 범위에 정의된 지역 변수는 final이거나 사실상 final이어야 합니다. 람다 안은 익명 클래스(anonymous inner class)이다 보니, 자바 컴파일러가 k, v와 같은 파라미터로 사용하는 변수와 로컬 변수를 구분하지 못한다고 한다. 해결방법으로는 클래스 단에서 변수를 만든 뒤에 사용해주면 된다. - 참고자료 자바 Local variable '변수명' defined in an enclosing sco..