首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >碱基未知变化类型'loadData‘

碱基未知变化类型'loadData‘
EN

Stack Overflow用户
提问于 2022-10-19 11:26:29
回答 1查看 101关注 0票数 0

我使用JHipster已经很长时间了。

但突然间,我遇到了这个愚蠢的例外,我找不到任何解决办法。

我还有另外一个没有任何问题的项目,但是在这个项目中,Liquibase说它不承认loadData更改类型。

代码语言:javascript
运行
复制
liquibase.parser.core.ParsedNodeException: Error parsing config/liquibase/changelog/00000000000000_initial_schema.xml: Unknown change type 'loadData'. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial.

我很感谢你的帮助

完整堆栈跟踪:

代码语言:javascript
运行
复制
2022-10-19T13:19:45.872+02:00 ERROR 182498 --- [all-club-task-1] t.j.c.liquibase.AsyncSpringLiquibase     : Liquibase could not start correctly, your database is NOT ready: liquibase.exception.SetupException: liquibase.parser.core.ParsedNodeException: Error parsing config/liquibase/changelog/00000000000000_initial_schema.xml: Unknown change type 'loadData'. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial. 

liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.parser.core.ParsedNodeException: Error parsing config/liquibase/changelog/00000000000000_initial_schema.xml: Unknown change type 'loadData'. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial.
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
    at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:380)
    at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:365)
    at liquibase.Liquibase.lambda$update$1(Liquibase.java:222)
    at liquibase.Scope.lambda$child$0(Scope.java:180)
    at liquibase.Scope.child(Scope.java:189)
    at liquibase.Scope.child(Scope.java:179)
    at liquibase.Scope.child(Scope.java:158)
    at liquibase.Liquibase.runInScope(Liquibase.java:2414)
    at liquibase.Liquibase.update(Liquibase.java:209)
    at liquibase.Liquibase.update(Liquibase.java:195)
    at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:314)
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:269)
    at org.springframework.boot.autoconfigure.liquibase.DataSourceClosingSpringLiquibase.afterPropertiesSet(DataSourceClosingSpringLiquibase.java:46)
    at tech.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:118)
    at tech.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:93)
    at tech.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:79)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: liquibase.exception.SetupException: liquibase.parser.core.ParsedNodeException: Error parsing config/liquibase/changelog/00000000000000_initial_schema.xml: Unknown change type 'loadData'. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial.
    at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:391)
    at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:339)
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:23)
    ... 19 common frames omitted
Caused by: liquibase.exception.ChangeLogParseException: liquibase.parser.core.ParsedNodeException: Error parsing config/liquibase/changelog/00000000000000_initial_schema.xml: Unknown change type 'loadData'. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial.
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
    at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:671)
    at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:383)
    ... 21 common frames omitted
Caused by: liquibase.parser.core.ParsedNodeException: Error parsing config/liquibase/changelog/00000000000000_initial_schema.xml: Unknown change type 'loadData'. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial.
    at liquibase.changelog.ChangeSet.toChange(ChangeSet.java:525)
    at liquibase.changelog.ChangeSet.handleChildNode(ChangeSet.java:454)
    at liquibase.changelog.ChangeSet.load(ChangeSet.java:382)
    at liquibase.changelog.DatabaseChangeLog.createChangeSet(DatabaseChangeLog.java:715)
    at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:370)
    at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:339)
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:23)
    ... 23 common frames omitted

我的databaseChangeLog文件:

代码语言:javascript
运行
复制
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
                        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

    <changeSet id="00000000000000" author="jhipster">
        <createSequence sequenceName="sequence_generator" startValue="1050" incrementBy="50"/>
    </changeSet>

    <!--
        JHipster core tables.
        The initial schema has the '00000000000001' id, so that it is over-written if we re-generate it.
    -->
    <changeSet id="00000000000001" author="jhipster">
        <createTable tableName="jhi_user">
            <column name="id" type="${uuidType}">
                <constraints primaryKey="true" nullable="false"/>
            </column>
            <column name="login" type="varchar(50)">
                <constraints unique="true" nullable="false" uniqueConstraintName="ux_user_login"/>
            </column>
            <column name="password_hash" type="varchar(60)"/>
            <column name="email" type="varchar(191)">
                <constraints unique="true" nullable="true" uniqueConstraintName="ux_user_email"/>
            </column>
            <column name="image_url" type="varchar(256)"/>
            <column name="activated" type="boolean" valueBoolean="false">
                <constraints nullable="false" />
            </column>
            <column name="lang_key" type="varchar(10)"/>
            <column name="activation_key" type="varchar(20)"/>
            <column name="reset_key" type="varchar(20)"/>
            <column name="created_by" type="varchar(50)">
                <constraints nullable="false"/>
            </column>
            <column name="created_date" type="timestamp"/>
            <column name="reset_date" type="timestamp">
                <constraints nullable="true"/>
            </column>
            <column name="last_modified_by" type="varchar(50)"/>
            <column name="last_modified_date" type="timestamp"/>
        </createTable>

        <createTable tableName="jhi_authority">
            <column name="name" type="varchar(50)">
                <constraints primaryKey="true" nullable="false"/>
            </column>
        </createTable>

        <createTable tableName="jhi_user_authority">
            <column name="user_id" type="${uuidType}">
                <constraints nullable="false"/>
            </column>
            <column name="authority_name" type="varchar(50)">
                <constraints nullable="false"/>
            </column>
        </createTable>

        <addPrimaryKey columnNames="user_id, authority_name" tableName="jhi_user_authority"/>

        <addForeignKeyConstraint baseColumnNames="authority_name"
                                 baseTableName="jhi_user_authority"
                                 constraintName="fk_authority_name"
                                 referencedColumnNames="name"
                                 referencedTableName="jhi_authority"/>

        <addForeignKeyConstraint baseColumnNames="user_id"
                                 baseTableName="jhi_user_authority"
                                 constraintName="fk_user_id"
                                 referencedColumnNames="id"
                                 referencedTableName="jhi_user"/>

        <addNotNullConstraint   columnName="password_hash"
                                columnDataType="varchar(60)"
                                tableName="jhi_user"/>
        <loadData
            file="config/liquibase/data/user.csv"
            separator=";"
            tableName="jhi_user"
            usePreparedStatements="true">
            <column name="id" type="${uuidType}"/>
            <column name="activated" type="boolean"/>
            <column name="created_date" type="timestamp"/>
        </loadData>
        <dropDefaultValue tableName="jhi_user" columnName="created_date" columnDataType="${datetimeType}"/>
        <loadData
            file="config/liquibase/data/authority.csv"
            separator=";"
            tableName="jhi_authority"
            usePreparedStatements="true">
            <column name="name" type="string"/>
        </loadData>
        <loadData
            file="config/liquibase/data/user_authority.csv"
            separator=";"
            tableName="jhi_user_authority"
            usePreparedStatements="true">
            <column name="user_id" type="${uuidType}"/>
        </loadData>
    </changeSet>

    <changeSet author="jhipster" id="00000000000002" context="test">
        <createTable tableName="jhi_date_time_wrapper">
            <column  name="id" type="BIGINT">
                <constraints primaryKey="true" primaryKeyName="jhi_date_time_wrapperPK"/>
            </column>
            <column name="instant" type="timestamp"/>
            <column name="local_date_time" type="timestamp"/>
            <column name="offset_date_time" type="timestamp"/>
            <column name="zoned_date_time" type="timestamp"/>
            <column name="local_time" type="time"/>
            <column name="offset_time" type="time"/>
            <column name="local_date" type="date"/>
        </createTable>
    </changeSet>
</databaseChangeLog>
EN

回答 1

Stack Overflow用户

发布于 2022-10-20 13:45:01

昨天我和@nvoxland谈过这个问题,他说他在基层论坛上回答了一个非常类似的问题。

简短的版本:您需要更新到最新的Liquibase版本,然后再试一次。如果这不起作用,那么应该将open.csv添加到依赖项中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74124525

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档