위 url은 ec2에 연결된 역할을 반환하는 url입니다. ec2에 연결된 역할이 없을 경우 해당 오류를 반환하게 됩니다.
해당 오류로 인해 프로그램이 실행되거나 프로세스를 진행할 때 문제가 되진 않습니다.
https://stackoverflow.com/questions/58378329/aws-instance-metadata-for-iam-is-not-found
위 url은 ec2에 연결된 역할을 반환하는 url입니다. ec2에 연결된 역할이 없을 경우 해당 오류를 반환하게 됩니다.
해당 오류로 인해 프로그램이 실행되거나 프로세스를 진행할 때 문제가 되진 않습니다.
https://stackoverflow.com/questions/58378329/aws-instance-metadata-for-iam-is-not-found
원인
자바 entity와 DB의 table이 일치하지 않아서 발생
생각했던 영어 질문지의 형태가 영어 질문, 한국어 해석으로 구성된 다는 것을 만든 후에 알게 되어 추후에 수정후 ddl을 update로 두고
실행하였더니 위와같은 에러가 발생하였다. ddl이 update로 설정돼있기 때문에 알아서 업데이트될 거라 생각했지만 DB를 확인해보니 업데이트되지 않았다.
해결 방법
DB가 자동으로 변경되지 않은 점으로 보아 DB를 수정한대로 변경하면 해결될 것으로 추측했고 해결되었다.
The requested metadata is not found at http://169.254.169.254/latest/user-data/ (0) | 2022.08.16 |
---|---|
Incorrect string value: '\xEC\x98\x81\xEC\x96\xB4...' (0) | 2022.08.01 |
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) (0) | 2022.08.01 |
duplicate content roots detected (0) | 2022.07.28 |
Failed to start bean 'documentationPluginsBootstrapper' (0) | 2022.07.27 |
Incorrect string value: '\xEC\x98\x81\xEC\x96\xB4...'
위와 같은 에러가 나며 maria db를 사용한다면
ALTER TABLE 테이블 이름 convert to charset utf8;
위 명령어로 해결 가능하다. 위 명령어는 테이블의 charset 을 utf8로 변경하는 것이다.
ec2 프리티어에서 만든 프로젝트를 빌드해보았다. 하지만 예상외로 시간이 많이 걸려 빌드를 실패하였다.
한 번에 50분이 넘어가는 경우도 있었다. 이를 해결하기 위해서 빌드를 빠르게 하는 방법과 해당 문제를 가진 사람들이 있는지 서치한 결과 gradle.properties 파일에 해당 값을 넣어주는 것으로 17분 만에 빌드에 성공하였다.
# for memory issue
org.gradle.daemon=false
# memory allotted to JVM
org.gradle.jvmargs=-Xmx1024m
# configure on demand
org.gradle.configureondemand=true
# parallel builds
org.gradle.parallel=true
# build Cache
android.enableBuildCache=true
# gradle caching
org.gradle.caching=true
램 1기가를 최대한 빌드하는데 쏘다 부으라는 ? 명령어로 보인다. 만약 gradle.properties 파일이 없다면 build.gradle 파일이 위치한 경로로 gradle.properties 파일을 생성해서 사용하면 된다.
could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement (0) | 2022.08.10 |
---|---|
Incorrect string value: '\xEC\x98\x81\xEC\x96\xB4...' (0) | 2022.08.01 |
duplicate content roots detected (0) | 2022.07.28 |
Failed to start bean 'documentationPluginsBootstrapper' (0) | 2022.07.27 |
invalid source release: 11 (0) | 2022.03.26 |
쿼리 dsl 경로 설정 부분을 변경하니 해결되었다.
// QueryDSL
idea {
module {
val kaptMain = file("$buildDir/generated/querydsl")
sourceDirs.add(kaptMain)
generatedSourceDirs.add(kaptMain)
}
}
기존 경로
"build/generated/source/kapt/main"
변경한 경로
"$buildDir/generated/querydsl"
Incorrect string value: '\xEC\x98\x81\xEC\x96\xB4...' (0) | 2022.08.01 |
---|---|
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) (0) | 2022.08.01 |
Failed to start bean 'documentationPluginsBootstrapper' (0) | 2022.07.27 |
invalid source release: 11 (0) | 2022.03.26 |
Unterminated string (0) | 2022.03.21 |
Spring boot 2.6버전 이후에 spring.mvc.pathmatch.matching-strategy 값이 ant_apth_matcher에서 path_pattern_parser로 변경되면서 swagger를 포함한 몇몇 라이브러리를 사용할 때 오류가 발생한다고한다.
application.yml 에 아래 설정을 추가하면 오류가 발생 하지 않는다.
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
https://www.inflearn.com/questions/230160
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) (0) | 2022.08.01 |
---|---|
duplicate content roots detected (0) | 2022.07.28 |
invalid source release: 11 (0) | 2022.03.26 |
Unterminated string (0) | 2022.03.21 |
외래키 설정 오류 collation & SQL Error [1452] [23000]: (conn=3205) Cannot add or update a child row: a foreign key constraint fails (0) | 2022.03.14 |
프로젝트 JDK 버전은 11로 설정 되어있지만 세팅이 JDK 8로 설정 되어있기 때문이다.
duplicate content roots detected (0) | 2022.07.28 |
---|---|
Failed to start bean 'documentationPluginsBootstrapper' (0) | 2022.07.27 |
Unterminated string (0) | 2022.03.21 |
외래키 설정 오류 collation & SQL Error [1452] [23000]: (conn=3205) Cannot add or update a child row: a foreign key constraint fails (0) | 2022.03.14 |
source release 11 requires target release 11 (0) | 2022.01.25 |
encodeURIComponent()
서버로 데이터를 보내기전 해당 데이터를 encodeURlComponent()로 감싸서 서버에게 보내면 성공적으로 특수문자(&,+)을 사용할 수 있었다.
URL의 특정한 문자를 UTF-8로 인코딩하여 하나, 둘, 셋, 혹은 네 개의 연속된 이스케이프 문자로 나타낸다.
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
Failed to start bean 'documentationPluginsBootstrapper' (0) | 2022.07.27 |
---|---|
invalid source release: 11 (0) | 2022.03.26 |
외래키 설정 오류 collation & SQL Error [1452] [23000]: (conn=3205) Cannot add or update a child row: a foreign key constraint fails (0) | 2022.03.14 |
source release 11 requires target release 11 (0) | 2022.01.25 |
Fail : 문자열을 날짜 및/또는 시간으로 변환하지 못했습니다. (0) | 2022.01.10 |
외래 키를 설정하려면 Collation 값이 일치해야 한다.
Collation 값 확인하는 방법
show full columns from article ;
아래와 같은 방법으로 Collation 값을 변경한다.
alter table category convert to character set utf8 collate utf8mb3_general_ci;
SQL Error [1452] [23000]: (conn=3205) Cannot add or update a child row: a foreign key constraint fails
Collation 값을 일치시켜준 후 외래 키를 생성하려고 하니 위와같은 오류를 만나게 되었다.
위 오류는 외래키를 생성하려는 테이블에서 외래키를 만들려는 값에 참조 테이블에 없는 값을 가지고 있기 때문이다.
invalid source release: 11 (0) | 2022.03.26 |
---|---|
Unterminated string (0) | 2022.03.21 |
source release 11 requires target release 11 (0) | 2022.01.25 |
Fail : 문자열을 날짜 및/또는 시간으로 변환하지 못했습니다. (0) | 2022.01.10 |
The bucket does not allow ACLs (0) | 2022.01.08 |
오류
source release 11 requires target release 11
해당 오류는 JDK 버전 오류이다.
해당 오류 발생시 확인해야하는 사항이 있다.
1. build.gradle 파일에서 sourceCompatibility = '11' 인지 확인한다.
2. ProjectStructure > ProjectSettings > Project
- ProjectSDK = 11
- Project language level = 11
글쓴이의 경우 1.8 버전이 default로 되있어서 오류가 난 것이었다.
3. Project Structure > Plaform Settings > SDKs
- SDK 버전이 설치 되어있는지 확인한다.
참고 글
https://hothoony.tistory.com/1105
Unterminated string (0) | 2022.03.21 |
---|---|
외래키 설정 오류 collation & SQL Error [1452] [23000]: (conn=3205) Cannot add or update a child row: a foreign key constraint fails (0) | 2022.03.14 |
Fail : 문자열을 날짜 및/또는 시간으로 변환하지 못했습니다. (0) | 2022.01.10 |
The bucket does not allow ACLs (0) | 2022.01.08 |
Cannot resolve reference to bean 'amazonS3' while setting constructor argument (0) | 2022.01.08 |