Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Liquibase update from java code gives ChangeLogParseException

$
0
0
In a ConfigServlet (part of a Maven project) a liquibase update is started. Sinds version 3.2.0 there's an exception thrown:

  1. Caused by: liquibase.exception.ChangeLogParseException: Error Reading Migration File: Found 2 files that match liquibase/root.changelog.xml
  2. at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:112)
  3. at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17)
  4. at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:215)
  5. at liquibase.Liquibase.update(Liquibase.java:192)
  6. at liquibase.Liquibase.update(Liquibase.java:181)
  7. at nl.procura.inn.web.servlets.ConfigServlet.updateDb(ConfigServlet.java:125)
  8. ... 14 more
  9. Caused by: java.io.IOException: Found 2 files that match liquibase/root.changelog.xml
  10. at liquibase.util.StreamUtil.singleInputStream(StreamUtil.java:189)
  11. at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:93)
  12. ... 19 more
I'm using Netbeans 8.0.2 (on Windows 7) running my web application. And that's seems to be the problem. When I deploy the war-file myself by copying this file into my Apache Tomcat server (version 7.0.57), no exception is thrown.
Also when I run the application by Netbeans but deleted my liquibase folder (with the changelog files) in the target directory (target/classes/liquibase) no exception is thrown. This target directory is of a different maven module than that of my web application.

While writing about this issue, I found out that my configuration of JRebel (version 6.0.2) caused the problem. Possibly JRebel added the target directory to my classpath somehow. By changing the configuration by just using the JRebel panel everything works fine again.

Unfortunately, it took me a lot of time to find the cause. Hopefully others with the same problem find this post.

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>