본문 바로가기

분류 전체보기

(383)
TestCode 실행 시 liquibase에서 Table "DATABASECHANGELOG" already exists; SQL statement 에러 문제 Test Code를 돌릴 때 liquibase에서 아래와 같이 'DATABASECHANGELOG" already exists; SQL statement' 라는 에러가 났다. liquibase로 changelog 중 schema.xml을 만들 때 DATABASECHANGELOG라는 테이블을 포함하지 않았고, 생성된 schema.xml에도 create하는 부분이 없는데 DATABASECHANGELOG 생성을 시도하고 있었다. 원인 DATABASECHANGELOG는 liquibaes에서 사용하고 있는 테이블이고, 없으면 liquibase에서 자동으로 생성한다. liquibase에서 DATABASECHANGELOG 테이블을 만들 때, 테이블이 있는 지 없는 지 조사한다. 조사할 때 이미 존재했던 DATAB..
liquibase에서 changelog 중 data.xml 생성할 때, GC overhead limit exceeded 에러 문제 liquibase로 changelog 중 data.xml을 생성하려고 했는데, 빈 data.xml이 생성되었다. 로그를 확인하니, data.xml 생성 도중 아래와 같이 GC overhead limit exceeded 에러가 발생했다. 실행한 liquibase 쉘 스크립트는 아래와 같다. INCLUDE_OBJTECTS는 data.xml 파일을 만들 때 포함할 테이블 목록이 있고, 테이블 양이 33개 정도 되었다. JDBC_DRIVER_HOME=${HOME}/.m2/repository/mysql/mysql-connector-java JDBC_DRIVER_VERSION=8.0.12 CLASSPATH=${JDBC_DRIVER_HOME}/${JDBC_DRIVER_VERSION}/mysql-connector..
Test 코드에서 h2 database로 MySql 쿼리 실행 시 row_number에서 syntax 에러 문제 MySql 조회 Query에 row_number를 사용하는 필드를 추가하고, Test Code를 돌렸는데, 아래와 같은 에러가 났다. Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement JOOQ로 작성한 쿼리와 실행된 SQL 쿼리는 대략 아래와 같았다. JOOQ Field groupSeqField = DSL.rowNumber() .over(partitionBy(tProduct.GROUP_CD) .orderBy(tProduct.ID.asc())) .as("groupSeq"); dslContext.select( tProduct.ID, groupSeqField ) .from(tProduct) .fetchInto(Product.cl..
#155 International Commerce 2 Key Word hazard: a source of danger; chance, risk When it comes to investments, research shows that women are more likely to weigh up potential hazards than their male counterparts. weigh up: 가늠하다. 따지다 intuitive: readily learned or understood As we enter new markets, it is more important than ever to make our products intuitive, so that people across cultures find them natural to use. backlash: ..
#154 International Commerce 1 Key Word window of opportunity: a brief time period in which an opportunity exists This year’s low-interest rate offered a window of opportunity to get easy credit and fund expansion. task force: a group of people working together to do a particular job, esp. to solve a problem The president’s task force was assigned to study the effect of higher tax rates on income mobility and federal revenue...
Jenkins나 Spring Boot에서 Test 시, liquibase 외래키 참조 에러 문제 Test 코드를 돌리거나, Jenkins에서 Test를 실행할 때 data.xml 관련해서 아래와 같은 에러가 났다. product 테이블에 product_code컬럼에 '상품 코드' 값을 넣으려고 하는데, '상품 코드' 값이 product_code 테이블에 존재하지 않는다는 의미다. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/linecorp/ladb/oacms/sd/sync/config/LiquibaseConfiguration.class]: Invocation of init meth..
Jenkins에서 Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd' liquibase 에러 문제 generateChangelog를 돌려서 새로운 data.xml과 schema.xml을 생성해 적용하였다. Jenkins에서 Build 돌 때, 아래와 같이 liquibase 관련하여 Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd' 에러가 났다. 원인 liquibase의 xsd 파일로, data.xml과 schema.xml의 문법이 맞는지 검증한다. https://forum.liquibase.org/t/different-versions-of-dbchangelog-xsd-in-project/7775 로컬에 설치된 liquibase 4.25 버전으로 data.xml, sch..
liquibase의 changelog인 schema.xml과 data.xml을 생성해주는 ShellScript 만들기 liquibase changelog인 schema.xml과 data.xml을 생성하기 위해 아래와 같이 Shell Script를 만들 수 있다. Shell Script 만들기 liquibase로 schema.xml을 만드는 명령어는 아래와 같다. JDBC_DRIVER_HOME=${HOME}/.m2/repository/mysql/mysql-connector-java JDBC_DRIVER_VERSION=8.0.12 CLASSPATH=${JDBC_DRIVER_HOME}/${JDBC_DRIVER_VERSION}/mysql-connector-java-${JDBC_DRIVER_VERSION}.jar DRIVER=com.mysql.cj.jdbc.Driver URL="jdbc:mysql://database 호스트명:2..
#153 Strategic Analysis 2 Key Word hone: make more effective, intense, or sharp/accurate Our interviewing techniques have been honed in order to help us pick exactly the right candidate. out-of-touch: lacking knowledge or information concerning current events and developments We never want to be out-of-touch with the market, but we also want to be ahead of the curve. demise: (기업, 기관, 사상의) 종말 epitomize: 완벽한 보기이다. 전형적으로 보여..
터미널에서 liquibase 실행 시, zsh: command not found: liquibase 에러 문제 liquibase 명령어를 터미널에서 실행하려는데 zsh: command not found: liquibase 에러가 났다. liquibase를 설치하지 않아서 생긴 문제였다. 해결 아래 사이트에서 liquibase CLI를 MAC용으로 다운받아 설치해준다. https://www.liquibase.com/download?_ga=2.106278084.610293300.1704768692-1776201919.1704768691 Download Liquibase | Liquibase.com --> --> Join the millions of developers using Liquibase to version, track, and deploy database changes faster and safer. ..