error 5

[에러해결] Unexpected error occurred in scheduled task

Unexpected error occurred in scheduled task org.springframework.transaction.UnexpectedRollbackException: Transaction silently rolled back because it has been marked as rollback-only 기존에 스프링부트 + JPA 를 사용해서 백엔드를 구축 중이었당 이번에 주기적인 알람 기능을 구현하면서 @Scheduled 어노테이션을 사용하게 되었고 자연스럽게 @Transactional 어노테이션이 붙어있던 트랜잭션에 @Scheduled 어노테이션을 붙여서 사용하게 되었다 그러나 Unexpected error occurred in scheduled task 에러 발생.. 구글링을 ..

error 2022.09.13

[에러해결] java.lang.RuntimeException: file name '' is too long ( > 100 bytes)

spring boot 코드를 통해 특정 api 에서 데이터를 받아와서 file 형태로 저장하는 과정에서 위 에러가 발생했다 TarArchiveOutputStream(gzOut).use { tOut -> tOut.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX) ... } 구글링해본 결과, TarArchiveOutputStream 에 LongFileMode 를 지정해 주어야 한다고 해서 위와 같이 코드를 수정했다. 위와 같이 Longfile 을 핸들링할때 옵션을 지정해 주지 않으면, default 모드는 LONGFILE_ERROR 이므로 Runtime Exception 을 뱉었던 것 같다

error 2021.12.22

[에러해결] Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value

spring boot 에서 jackson object mapper로, 받아온 API 의 응답을 파싱할때 생긴 오류 해결 방법 나는 기존에 jackson objectMapper 을 한개 생성해서 사용중이었음 @Configuration class ObjectMapperConfiguration { @Bean fun objectMapper(): ObjectMapper { val mapper = ObjectMapper() mapper.registerModules(JavaTimeModule(), KotlinModule()) mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) // 요 아랫 줄을 추가했다! mapper.configure(JsonReadFea..

error 2021.12.06

[에러해결] A component required a bean named 'redisTemplate' that could not be found.

현재 상황 한개의 spring boot 에 두개의 redis를 연결해야 하는 상황 기존 코드는 한개의 redis 만 연결해 두었으나 변경하게 되면서, config/하위 폴더에 RedisDevConfig RedisRealConfig 이렇게 두개의 Config 를 만들어두게 되었다 @Bean(name = ["devRedisConnectionFactory"]) @Qualifier("devRedisConnectionFactory") redisConnectionFactory: RedisConnectionFactory이렇게 Bean 이름을 각각 명시해주고, Qualifier 로 해당 이름의 빈을 가져와서 쓰면 될것이라고 생각했다. 오류 발생 org.springframework.beans.factory.NoSuchB..

error 2021.05.06

[에러 해결] Caused by: java.net.BindException: Address already in use

😩 에러 발생 spring-boot 프로젝트를 여느때와 다름없이 intelliJ에서 실행시켰더니 갑자기 아래와 같은 오류들이 발생하며 실행이 안되었다….🤦🏻‍♀️ Caused by: java.net.BindException: Address already in use Execution failed for task ':Application.main()'. > Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 Caused by: org.apache.catalina.LifecycleExce..

error 2020.04.02