JaeWon's Devlog
article thumbnail
[ERROR] Java에서 크롤링 Selenium(셀레니움) 사용 시 Unable to establish websocket connection to 에러 해결
Error 2023. 4. 18. 17:21

1. 에러 발생 상황 - Java 에서 크롤링을 위해서 Selenium 을 사용하고자 하였는데 아래와 같은 에러가 발생. - 크롤링을 위해서 Chrome 브라우저 창을 열어 접속을 시도한 것 같은데, WebSocket 에 대한 연결을 할 수 없다는 메시지 같았다. org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:53222/devtools/browser/40fe271d-cd90-4cf0-8440-600b29aa2fe4 Build info: version: '4.1.4', revision: '535d840ee2' System info: host..

article thumbnail
[ERROR] ONLY_FULL_GROUP_BY(Feat. MySQL)
Error 2022. 12. 17. 10:08

로컬 환경에서 MySQL 로 GROUP BY 를 하려고 하면 아래 에러가 발생하였다. select department_id, admission_year, count(1) as cnt from student_table group by department_id, admission_year ; Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'department_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 쿼리만 본다면 잘못..

article thumbnail
[ERROR] IndexOutOfBoundsException(With. MyBatis)
Error 2022. 12. 3. 11:47

1. 에러 발생 상황 - MyBatis(마이바티스) 를 통해서 DB 에서 데이터를 조회하려는 도중 아래와 같은 에러가 발생. ### Cause: java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4] with root cause java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[na:na] at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(..

article thumbnail
[ERROR] Could not resolve all files for configuration ':classpath'. 에러 해결(With. Gradle Build)
Error 2022. 11. 26. 16:46

주말에 간단하게 공부를 하기 위해서 인텔리제이를 키고 진행하려 했는데, 프로젝트 빌드가 계속해서 실패를 하게 되었다. A problem occurred configuring root project 'demo'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-buildpack-platform:2.7.6. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.7.6 > org.springframework.boot:spring-boot-g..

article thumbnail
[Error] java.lang.ClassCastException 해결법
Error 2022. 10. 4. 13:35

출근 하고 Slack 을 확인하니 배치에서 오류가 마구마구 올라오고 있었다. 확인해보니 OpenAPI 를 통해서 응답값을 받아 형변환(Casting) 하는 도중에 에러가 발생하였는데, OpenAPI 응답값 중 기존 Double 형으로 주던 데이터를 Integer 형으로 주면서 에러가 발생하였다. java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Double (java.lang.Integer and java.lang.Double are in module java.base of loader 'bootstrap') 1. 원인 - 간단하게 발생한 비슷한 코드는 아래와 같습니다. /** [{id=1, nam..

article thumbnail
[Error] MethodArgumentTypeMismatchException(with. Postman)
Error 2022. 9. 29. 09:56

API 를 개발하고 PostMan 으로 확인하는 도중 아래와 같은 에러로 테스트가 되지 못 하였다. { "timestamp": "2022-09-28T09:23:35.655+00:00", "status": 400, "error": "Bad Request", "trace": "org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to ... "message": "Failed to convert value of type 'java.lang.String' to required type 'java.lang.Boolean'; nested ..

article thumbnail
[Error] unreported exception IOException; must be caught or declared to be thrown
Error 2022. 8. 14. 11:55

개발을 완료하고 컴파일을 하던 도중 아래와 같은 에러 메시지가 나오면서 컴파일이 되지 못하였다. error: unreported exception IOException; must be caught or declared to be thrown throw new IOException("IOException 발생"); 간단하게 나마 번역해보면, throw new IOException 은 보고되지 않은 예외 이다. 해결하기 위해 실제 개발 코드는 아니지만 간단하게 예제를 통해 정리하고자 한다. 1. 에러 발생 원인 public void test(){ String text = ""; if(text == null || text.isEmpty()) { throw new IOException("IOException 발..

article thumbnail
[Intelli J] The server time zone value 'KST' is unrecognized 에러 해결(MySQL)
Error 2022. 7. 31. 12:53

Intelli J에서 MySQL DB를 연결하여 사용하고자 하였는데, 정보를 입력하고 Connection 을 시도하니 아래와 같은 에러가 발생하면서 접속되지 않았다.(MySQL Workbench 로는 정상 접속이 되었다) The server time zone value 'KST' is unrecognized or represents more than one time zone. 1. 해결법 - 보통 프로젝트를 실행하여 DB를 접속할 때는 Datasource의 url에 ?serverTimeZone=Asia/Seoul 을 추가한다. - Intelli J 에서는 해당 URL을 추가하여도 해결되지 않고, Advanced 탭 아래에 설정하는 위치에 해당 값을 설정하여야만 한다. - 인텔리제이 -> [Database..

article thumbnail
[MySQL] Safe mode 해제 하는 방법(Error Code: 1175)
Error 2022. 7. 24. 13:17

MySQL 에서 테이블을 생성하고 Update/Delete 작업을 하려고 하는 도중에 다음과 같은 에러로 인해 실행되지 못 했다. Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 기본적으로 MySQL에서 테이블에 대해 Safe Mode로 하여 데이터를 함부로 변경하지 못하도록 막아둔 것이었다. 이 safe mode 를 풀어야 데이터를 변경할 수 있어 해제하는 방법을 정리하고자 한다. 1. S..

article thumbnail
[Vue.js] Axios 통한 RestFul API 통신시 415 에러 해결법
Error 2022. 6. 25. 17:25

1. 에러 발생 상황 - Vue.js와 SpringBoot 간에 Axios를 통한 Rest 통신 시 415 에러가 발생하였다. 2. 원인 - vue.js에서 axios를 사용하여 통신시 기본적으로 content-type 이 x-www-form-urlencoded 로 설정되어 있다. 3. 에러 발생시 해결법 - vue.js 에서 axios 설정하는 곳에서 content-type 을 직접 설정하여 사용한다. - ex 1) axios.defaults.headers.get['Content-Type'] = 'application/json'; - ex 2) let test = { headers: { 'Content-Type': 'application/json' } , url: '/localhost:8080' , m..