作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 JEE+WildFly 应用程序启动时使用 liquibase。启动AS时,liquibase抛出ChangeLogParseException:
09:41:40,602 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "bets.war" was rolled back with the following failure message:
{
"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./bets" => "java.lang.RuntimeException: java.lang.RuntimeException: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist
Caused by: java.lang.RuntimeException: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist
Caused by: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist"},
Liquibase 参数在 web.xml 中设置:
<!-- liquibase auto startup -->
<context-param>
<param-name>liquibase.changelog</param-name>
<param-value>:classpath/WEB-INF/db-changelog.xml</param-value>
</context-param>
<context-param>
<param-name>liquibase.datasource</param-name>
<param-value>java:jboss/datasources/BetsDS</param-value>
</context-param>
<context-param>
<param-name>liquibase.onerror.fail</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>liquibase.contexts</param-name>
<param-value>production</param-value>
</context-param>
<listener>
<listener-class>liquibase.integration.servlet.LiquibaseServletListener</listener-class>
</listener>
结构如下:
查看了SO中的主题,db-changelog位于.war包中:
已尝试将 liquibase.changelog 值重命名为 WEB-INF/db-changelog.xml 和/WEB-INF/db-changelog.xml,仍然相同。
最佳答案
已经想通了。将 db-changelog 移至 main/resources/META-INF 并将参数设置为
<param-value>META-INF/db-changelog.xml</param-value>
现在一切正常:
[2018-05-27 11:27:42,823] Artifact bets:war: Artifact is deployed successfully
[2018-05-27 11:27:42,823] Artifact bets:war: Deploy took 13 582 milliseconds
关于java - Liquibase 变更日志不存在 - ChangeLogParseException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50550141/
我正在尝试在 JEE+WildFly 应用程序启动时使用 liquibase。启动AS时,liquibase抛出ChangeLogParseException: 09:41:40,602 ERROR
当我尝试通过以下方式启动 Liquibase 时: JdbcConnection liquibaseConnection = new JdbcConnection(connection); Liqui
我是一名优秀的程序员,十分优秀!