[spring] error: Could not open JPA EntityManager for transaction] with root cause

jiyeong·2025년 1월 29일

빌드를 성공하고, 실행까지 성공하였다.
이제 mysql 데이터를 불러오는 url를 postman으로 호출했는데 에러 발생.

The last packet sent successfully to the server was 0 milliseconds ago. 
The driver has not received any packets from the server.


[sdemo1] [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction] with root cause

java.net.ConnectException: Connection refused

connection refused 가 뜨는 것을 보니, mysql 접속이 제한된다고 추측하고 터니멀창에서 mysql 에 접속을 시도했다.

> mysql -h my-database-1.{생략}.ap-northeast-2.rds.amazonaws.com -P 3306 -u admin -p

Enter password:

ERROR 1045 (28000): Access denied for user 'admin'@'115.138.27.93' (using password: YES)

예상대로 denied되었다

profile
꿈꾸는 개발자

0개의 댓글