Project/에러해결

Java UnsupportedOperationException 오류 해결– .toList()가 문제 ✨ 문제 상황Spring Boot 프로젝트에서 사용자 목록을 처리하던 중, 다음과 같은 예외가 발생했다.java.lang.UnsupportedOperationException코드는 대략 다음과 같은 구조였다:List usernames = List.of("alice", "bob", "charlie");usernames.add("david"); // ❌ 여기서 예외 발생List.of(...)는 불변 리스트(immutable list)를 반환하기 때문에 .add()와 같은 수정 메서드는 허용되지 않는다.비슷한 문제는 Stream API의 .toList() 사용 시에도 발생할 수 있다.List usernames ..
ERRORType definition error: [simple type, class kr.---.---_open_api.dto.--DTO$Process]  🔹 simple type → Jackson이 복잡한 타입으로 인식하지 못했다는 뜻즉, 이 클래스(Process)를 직렬화/역직렬화 가능한 구조체로 판단하지 못했다는 것왜 못했냐? 바로 👇🔹 ---DTO$Process → 내부 클래스 (non-static inner class)$ 기호는 Java 컴파일러가 **내부 클래스(inner class)**를 표시할 때 사용하는 표기법즉, Process가 ---DTO 안의 static이 없는 내부 클래스라는 뜻이에요 🧠 Jackson 입장에서는?Jackson이 new Process()를 하려고 하는데,내..
문제모듈이 이미 존재한다고 다시 등록이 안됨..Module already exists   해결방법 1) modules.xml 파일의 내용 삭제https://ghi512.tistory.com/43 [IntelliJ] Module already exists 에러 해결 방법개요 아래는 "C:\Work\JAVA\fastcampus" 위치에 "Chap4" 라는 이름의 새로운 모듈을 생성하고자 하는 상황이다. 그런데 "Module already exists" 라는 에러 메시지가 뜨면서 모듈이 생성되지 않는다. 이미 존재하ghi512.tistory.com 방법 2)1번 방법이 되지 않아서 gpt가 알려줬다.. File-invaildate Caches-Restat 해보면   modules가 잘 설치된 것을 볼 수있다..
문제com.mongodb.MongoCommandException: Command failed with error 18 (AuthenticationFailed): 'Authentication failed.'  MongoDB 서버에 인증 정보를 사용하여 로그인 시도가 실패했음을 의미한다. 오류 메시지는 "Authentication failed."로, 인증이 실패했다는 것을 나타낸다.   해결application.yml 파일에서 접속 URI를 바꾸어 주었다. 변경 전spring: application: name: chatting-service data: mongodb: username: root password: 1234 host: 35.192.--.--- p..
상황문제 : GATEWAY 에 api/v1/user 로 들어오는 요청이 USER-SERVICE 로  흘러가지 않았다.GATEWAY 에 USER-SERVICE가 분명 올라가 있다  하지만 해당 경로로 요청할 시 GATEWAY 에서는 USER-SERVICE를 찾을 수 없다고 로 log가 나온다.이유는 api/v1/user 로 들어오는 요청에 대해 gateway에선 USER-SERVICE로 로드밸런싱 해주는데 gateway와 USER-SERVICE는 서로 다른 network에서 실행중이어서 소통이 안됐다.   해결따라서 아래의 network 를 만들어서 소통이 가능하게 했다.docker network create test-net 생성 후 아래의 명령어로 container를 실행할 때 네트워크 추가docker ..
에러org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl Unable to get public no-arg constructorHibernate가 엔티티 클래스를 인스턴스화하려고 할 때 기본 생성자를 찾지 못할 때 발생하는 오류 해결https://stackoverflow.com/questions/75487370/how-to-resolve-an-unable-to-get-public-no-arg-constructor-error-while-trying How to resolve an ' Unable to get public no-arg constructor' error while trying to push data to GCS and load it i..
에러 상황   Git bash에서 mysql에 들어가려고 했지만 아래처럼 오류가 뜬다.the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' 이 오류는 일반적으로 Window환경에서 Git bash 또는 Cygwin과 같은 Unix 호환 쉘을 사용할 때 나타난다.특히, docker, kubectl, 또는 mysql과 같은 상호작용이 필요한 CLI 프로그램을 실행할 때 발생할 수 있다.이 메시지는 터미널이 TTY(Teletypewriter)를 인식하지 못한다는 것을 의미한다.  💡 TTY(Teletypewriter)원래 물리적인 전신 타자기를 의미하지만, 현대 컴퓨팅에서는 터미널 인터페이..
에러 상황사용자가 도서를 등록할 때, 도서 제목만 입력해도 관련 도서명이 검색되도록 하고 싶었다.도서 DB가 필요했다.도서 목록은 알라딘 등 다양한 도서 구매 사이트에서 엑셀로 제공해주었다. 엑셀 파일을 csv파일로 바꾸고 doker에 등록해둔 mysql로 도서 DB를 넣고자 했다. 먼저 파일에 대한 테이블을 만들고 이 안에 데이터를 넣으면 된다.CREATE TABLE book ( PRIMARY KEY (순번), 순번 INT, 구분 VARCHAR(20), 상품명 VARCHAR(255), ItemId VARCHAR(20)..
에러 상황@GetMapping("/findByID/{userId}")public ResponseEntity findByID(@PathVariable("userId") Long userId) { Optional userEntity = userService.findByUserId(userId); if (userEntity.isEmpty()) { return ResponseEntity.status(HttpStatus.NOT_FOUND).build(); } ResponseUser returnValue = new ModelMapper().map(userEntity, ResponseUser.class); return ResponseEntity.status(HttpStatus...
error 상황io.jsonwebtoken.security.WeakKeyException: The specified key byte array is 192 bits which is not secure enough for any JWT HMAC-SHA algorithm. The JWT JWA Specification (RFC 7518, Section 3.2) states that keys used with HMAC-SHA algorithms MUST have a size >= 256 bits (the key size must be greater than or equal to the hash output size). Consider using the Jwts.SIG.HS256.key() builder (..
sesam
'Project/에러해결' 카테고리의 글 목록