IncludeAll: Could not find directory

I’ve been having problems with the includeAll tag throwing:

Caused by: org.xml.sax.SAXException: Could not find directory database/updater/updates/6_0/ at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:304) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:70) ... 128 more

with the tag in a file called changes.xml in the database/updater/updates/6_0/ folder in the classpath which is included in a file master.xml with the tag in the database/updater/updates folder.

When I replace the includeAll tag with an include tag for every changelog, (ie in changes.xml) everything works fine.

Am I doing something wrong with entering the path, or is it something else?  All I really need is for the include tag to pull in everything from the directory that changes.xml is in.  I’ve tried but that throws a similar exception. I’ve also tried including the includeAll tag in the master.xml file to no avail.

That should work.  Are you using the latest version of LiquiBase (1.9.3).  We have had a couple issues related to includeAll handling on different platforms.  What OS are you running?

Nathan

Yes this was with 1.9.3, and it was running in linux.  It’s run by spring with the bean defined like this:

               

I created a bug report for it: http://liquibase.jira.com/browse/CORE-396

Thanks for reporting it.

Nathan

Thanks a lot Nathan.

It looks like http://liquibase.jira.com/browse/CORE-396 has been closed because it could not be reproduced.  I have been abel to reproduce using 2.01.  I added comments to the bug.

Thanks for the additional info. I reopened it.


Nathan

I can reproduce the same problem with includeAll tag in Liquibase version 3.0.2 when trying to execute LB scripts upon web application startup on Tomcat 7 64bit under Windows 7 deployed as a war file. As a workaround I have to use “include file” tag for EACH script, which will not be acceptable once we go over 100 LB script files. I hope this can be resolved. Thanks.

I created https://liquibase.jira.com/browse/CORE-1399 to track the bug. It probably won’t go into 3.0.3 but hopefully will be resolved soon.


Nathan

I am using includeAll in a Tomcat WAR application under Windows just fine. My only minor problem is that, even with the latest updates, it still doesn’t handle relativeToChangelogFile correctly.

I’ll take another look at CORE-1399 with 3.0.7


Nathan