使用jhipster构建微服务,在打包启动是报错:liquibase.exception.LockException: Could not acquire ch_JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > 使用jhipster构建微服务,在打包启动是报错:liquibase.exception.LockException: Could not acquire ch

使用jhipster构建微服务,在打包启动是报错:liquibase.exception.LockException: Could not acquire ch

 2018/1/10 18:16:24  一边天  程序员俱乐部  我要评论(0)
  • 摘要:报错的信息:liquibase.exception.LockException:Couldnotacquirechangeloglock.说明:当微服务构建完成后,在resource中有个文件:/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml将内容更改为如下:[code="ja<?xmlversion="1.0"encoding="utf-8"?><
  • 标签:使用 not 服务 ASE 启动
报错的信息:

   liquibase.exception.LockException: Could not acquire change log lock.

说明:当微服务构建完成后,在resource中有个文件:
/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml

    将内容更改为如下:

     [code="ja<?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-3.5.xsd
                        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

    <property name="now" value="now()" dbms="mysql,h2"/>
    <property name="now" value="current_timestamp" dbms="postgresql"/>
    <property name="now" value="sysdate" dbms="oracle"/>

    <property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle"/>

    <changeSet id="00000000000000" author="jhipster" dbms="postgresql,oracle">
        <createSequence sequenceName="hibernate_sequence" startValue="1000" incrementBy="1"/>
    </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_persistent_audit_event">
            <column name="event_id" type="bigint" autoIncrement="${autoIncrement}">
                <constraints primaryKey="true" nullable="false"/>
            </column>
            <column name="principal" type="varchar(50)">
                <constraints nullable="false" />
            </column>
            <column name="event_date" type="timestamp"/>
            <column name="event_type" type="varchar(255)"/>
        </createTable>

        <createTable tableName="jhi_persistent_audit_evt_data">
            <column name="event_id" type="bigint">
                <constraints nullable="false"/>
            </column>
            <column name="name" type="varchar(150)">
                <constraints nullable="false"/>
            </column>
            <column name="value" type="varchar(255)"/>
        </createTable>
        <addPrimaryKey columnNames="event_id, name" tableName="jhi_persistent_audit_evt_data"/>

        <createIndex indexName="idx_persistent_audit_event"
                     tableName="jhi_persistent_audit_event"
                     unique="false">
            <column name="principal" type="varchar(50)"/>
            <column name="event_date" type="timestamp"/>
        </createIndex>

        <createIndex indexName="idx_persistent_audit_evt_data"
                     tableName="jhi_persistent_audit_evt_data"
                     unique="false">
            <column name="event_id" type="bigint"/>
        </createIndex>

        <addForeignKeyConstraint baseColumnNames="event_id"
                                 baseTableName="jhi_persistent_audit_evt_data"
                                 constraintName="fk_evt_pers_audit_evt_data"
                                 referencedColumnNames="event_id"
                                 referencedTableName="jhi_persistent_audit_event"/>
    </changeSet>
</databaseChangeLog>
va"]
      
     

更改完后,将数据库中之前新建的表删除,然后重新打包微服务,启动即可!
发表评论
用户名: 匿名