🪓 삽질일기

    [SpringBoot][Kotlin] org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing 에러

    [SpringBoot][Kotlin] org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing 에러

    실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발 강의를 들으면 주문서비스 테스트를 작성하고, 실행했는데 에러를 만났다. 반가워~👋 에러메세지 org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : com.jpabook.jpashop.domain.Order.delivery -> com.jpabook.jpashop.domain.Delivery; nested exception is java.la..

    [Node.js][Typescript] node_modules/@types/express-serve-static-core/index.d.ts:745:13 - error TS1005: ';' expected.

    [Node.js][Typescript] node_modules/@types/express-serve-static-core/index.d.ts:745:13 - error TS1005: ';' expected.

    오랜만에 예전에 했던 Node.js + Express + Typescript 프로젝트를 실행했더니 여러 오류가 났다...!! 😵 node_modules/@types/express-serve-static-core/index.d.ts:745:13 - error TS1005: ';' expected. ... node_modules 안에서 오류가 난거라 패키지문제인데, 구글링을 통해 이 이슈를 찾았다. https://github.com/DefinitelyTyped/DefinitelyTyped/issues/62300 @types/express-serve-static-core/index.d.ts Typescript build error (version 4.17.31) · Issue #62300 · Definitel..

    [Spring Boot] No tests found for given includes: 에러

    [Spring Boot] No tests found for given includes: 에러

    Spring Boot로 테스트 작성 후 IntelliJ내의 테스트 실행버튼을 눌러 테스트를 시도했다. 그런데... Execution failed for task ':test'. > No tests found for given includes: [test코드 경로](filter.includeTestsMatching) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. 이렇게 떴다..!! 분명 @Test가 붙은 테스트들이 존재하는데...왜 없다고 하는 것인가? 인프런에 나와..

    [Spring Boot] Error creating bean with name 'entityManagerFactory' defined in class path resource

    [Spring Boot] Error creating bean with name 'entityManagerFactory' defined in class path resource

    Spring Boot, Kotlin, JPA, H2를 이용해서 API 테스트코드를 작성중이었다. Error creating bean with name 'entityManagerFactory' defined in class path resource Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceExcepti..

    [EC2][Ubuntu] E212: Can't open file for writing

    [EC2][Ubuntu] E212: Can't open file for writing

    문제 파일 편집을 위해 vi로 파일을 편집하고 저장하는데, 에러메세지가 나왔다. $ vi filename 에러메세지 E212: Can't open file for writing 원인 내가 파일을 편집하려고 한 위치에서 ubuntu사용자에게 편집 권한이 없었기 때문이다. 해결방법 1. vi 앞에 sudo를 붙여준다. $ sudo vi filename 2. sudo su로 root사용자로 전환하여 파일을 편집한다, $ sudo su $ vi filename

    [AWS EC2] WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

    [AWS EC2] WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

    AWS EC2에서 탄력적 IP를 사용하다가, 인스턴스를 바꿨을 경우 터미널에서 ssh 접속시 경고창이 뜬다. 접속하는 IP는 같지만, 실제 인스턴스지문이 달라졌기 때문이다. 오류 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! 해결방법 ssh-keygen -R {ip or domain} # ssh-keygen -R 1.12.123.123 명령어를 쳐준뒤, 다시 ssh 접속을 하면 잘된다~

    [Ubuntu] EACCES: permission denied, scandir '/root/.npm/_logs'

    [Ubuntu] EACCES: permission denied, scandir '/root/.npm/_logs'

    새로 세팅한 EC2에 node설치하고 npm 명령어를 사용하는데 아래와같이 에러가 났다. EACCES: permission denied, scandir '/root/.npm/_logs' 에러메세지에는 sudo chown -R 1000:1000 "/root/.npm"를 해보라고 되어있는데, 실행해봐도 같은 오류가 생긴다. 나는 root계정으로 작업을 하고있었는데, 내가 작업하려던 경로는 ubuntu유저에 의해 관리되는 폴더라 그런듯했다. exit하고 ubuntu유저로 npm명령어를 실행해주니 잘된다..! root는 다할수있는 줄 알았는데 그런건 아닌가보다 :)

    [Codedeploy] 에러메세지 및 해결방법 정리

    [Codedeploy] 에러메세지 및 해결방법 정리

    Codedeploy + Github actions 로 CI/CD를 구축하면서 엄청나게 많은 시도와 많은 에러메세지들을 만났었는데, 시도하면서 만난 에러메세지들과 해결방법들을 정리해두려고 한다. (Github actions에서 겪은 문제들은 따로 올릴 예정!) Error 로그 확인방법 1. 먼저 Codedeploy의 경우 AWS codedeploy에서 해당 배포를 클릭하면 에러메세지를 확인할 수 있다. codedeploy설정과 관련된 에러라면 대부분 여기 빨간박스에 에러메세지가 뜬다. 2. codedeploy설정이 아닌, 배포스크립트를 수행하던 중 오류가 발생했다면, 하단으로 스크롤하여 View events를 클릭하면, 더욱 자세한 오류메세지를 보여준다. View events 클릭 여기서 하단의 Scrip..

    [Spring Boot][Firebase] FCM설정 시, Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ~

    [Spring Boot][Firebase] FCM설정 시, Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ~

    바쁘신 분들을 위한 해결책 요약 firebase-message-sw.js 경로 확인 -> resources/static 경로에 있어야합니다!!!! https적용 여부, 나는 http://localhost에서도 1번 해결책만으로 위 오류는 없어졌지만, https에서만 된다고는 하니, 안된다면 시도해보길! 이슈 음~ 아까 생긴 오류 해결한지 30분도 안되서 오류 하나 추가요... 너무 좋다~~🙃🙃 FCM테스트 하려고 하는데 Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ~ 검색해보니 http에서 이런에러가 난다길래, https적용된 도메인에 올려서 다시 테스트..

    [Spring Boot] Restful API 404 Found, html 출력

    [Spring Boot] Restful API 404 Found, html 출력

    이슈 최근에, Spring Boot를 initializr부터 직접사용해서 프로젝트를 만들어보고 있는데, 단순한 테스트용 Get API부터 호출이 안되고 404 Not Found가 떴다. 분명 제대로 만들 것 같은데...왜그런가해서 검색을 해보니 패키지 기본 경로 ex) com.demo.example 이 아래에 Controller및 Application 파일이 있지 않으면 찾지 못해서라고 한다. 하지만 나는 기본 경로 아래에 잘 작성한 것 같다고 생각되었다. 문제 & 해결 계속 Controller에서 이 경로로 못들어오는 줄 알았는데, 혹시나해서 프린트를 찍어봤더니 "hi"는 출력이 된다! 그럼 return "test"가 제대로 동작하지 않아서 Not found가 뜬다는 것이다. 현재 "test"에 노란줄..