I'm comming with popular erorr which is: class path resource [db/file.xml] cannot be resolved to URL because it does not exist.
I'm using Spring Boot with version 1.3.5.RELEASE
and I'm trying to use liquibase with it.
My project is multimodule. In module A I have Main class within which I run whole application.
In module B under (path from repository root) B/src/main/resources/db/file.xml
I have an xml with with changesets. In module A in application.properties I have this configuration:
...
liquibase.change-log=classpath:db/db.changelog.project-master.xml
spring.jpa.hibernate.ddl-auto=none
spring.h2.console.enabled=true
db/db.changelog.project-master.xml is file within module A.
Under this file (db.changelog.project-master.xml) I have include that shoudl include this changesets from another module (module B)
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
<include file="db/file.xml" />
</databaseChangeLog>
I have tried also with <include file="classpath:db/file.xml" />
.Unfortuantely when I run application from module A I get:
Caused by: liquibase.exception.ChangeLogParseException: Error Reading Migration File: class path resource [db/file.xml] cannot be resolved to URL because it does not exist
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:112)
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17)
at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:404)
at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:267)
... 25 more
Caused by: java.io.FileNotFoundException: class path resource [db/file.xml] cannot be resolved to URL because it does not exist
Could you tell me what is wrong?