Written by
spring-style
on
on
[에러해결] java.lang.RuntimeException: file name '' is too long...
[에러해결] java.lang.RuntimeException: file name '' is too long...
반응형
spring boot 코드를 통해
특정 api 에서 데이터를 받아와서 file 형태로 저장하는 과정에서
위 에러가 발생했다
TarArchiveOutputStream(gzOut).use { tOut -> tOut.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX) ... }
구글링해본 결과,
TarArchiveOutputStream 에 LongFileMode 를 지정해 주어야 한다고 해서
위와 같이 코드를 수정했다.
위와 같이 Longfile 을 핸들링할때 옵션을 지정해 주지 않으면,
default 모드는 LONGFILE_ERROR 이므로
Runtime Exception 을 뱉었던 것 같다
반응형
from http://jo5ham.tistory.com/38 by ccl(A) rewrite - 2021-12-22 17:01:17